~ubuntu-branches/ubuntu/raring/gnutls26/raring

« back to all changes in this revision

Viewing changes to lib/gnutls_cipher_int.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008 Free Software Foundation
 
2
 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2010 Free
 
3
 * Software Foundation, Inc.
3
4
 *
4
5
 * Author: Nikos Mavrogiannopoulos
5
6
 *
6
 
 * This file is part of GNUTLS.
 
7
 * This file is part of GnuTLS.
7
8
 *
8
 
 * The GNUTLS library is free software; you can redistribute it and/or
 
9
 * The GnuTLS is free software; you can redistribute it and/or
9
10
 * modify it under the terms of the GNU Lesser General Public License
10
11
 * as published by the Free Software Foundation; either version 2.1 of
11
12
 * the License, or (at your option) any later version.
30
31
extern int crypto_cipher_prio;
31
32
extern gnutls_crypto_cipher_st _gnutls_cipher_ops;
32
33
 
33
 
typedef struct {
34
 
  gnutls_crypto_single_cipher_st* cc;
35
 
  void* ctx;
 
34
typedef struct
 
35
{
 
36
  const gnutls_crypto_single_cipher_st *cc;
 
37
  void *ctx;
36
38
} reg_hd;
37
39
 
38
 
typedef struct {
39
 
        int registered; /* true or false(0) */
40
 
        union {
41
 
                void* gc; /* when not registered */
42
 
                reg_hd rh; /* when registered */
43
 
        } hd;
 
40
typedef struct
 
41
{
 
42
  int registered;               /* true or false(0) */
 
43
  union
 
44
  {
 
45
    void *gc;                   /* when not registered */
 
46
    reg_hd rh;                  /* when registered */
 
47
  } hd;
44
48
} cipher_hd_st;
45
49
 
46
 
int _gnutls_cipher_init (cipher_hd_st*, gnutls_cipher_algorithm_t cipher,
47
 
                                 const gnutls_datum_t * key,
48
 
                                 const gnutls_datum_t * iv);
49
 
int _gnutls_cipher_encrypt (const cipher_hd_st *handle, void *text, int textlen);
50
 
int _gnutls_cipher_decrypt (const cipher_hd_st *handle, void *ciphertext,
 
50
int _gnutls_cipher_init (cipher_hd_st *, gnutls_cipher_algorithm_t cipher,
 
51
                         const gnutls_datum_t * key,
 
52
                         const gnutls_datum_t * iv);
 
53
int _gnutls_cipher_encrypt (const cipher_hd_st * handle, void *text,
 
54
                            int textlen);
 
55
int _gnutls_cipher_decrypt (const cipher_hd_st * handle, void *ciphertext,
51
56
                            int ciphertextlen);
52
 
void _gnutls_cipher_deinit (cipher_hd_st* handle);
 
57
void _gnutls_cipher_deinit (cipher_hd_st * handle);
53
58
 
54
59
#endif /* GNUTLS_CIPHER_INT */