diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-18 23:33:37 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-18 23:33:37 +0200 |
commit | 59e2ebfae8c973f62272ed22c6bf52aa28913910 (patch) | |
tree | f81bf18b737e6a86155a2e059227a6c1cde44455 /lib/gnutls_cipher_int.h | |
parent | 664098d0bf95dd1990fe2a9a16052634be64c3e8 (diff) | |
download | gnutls-59e2ebfae8c973f62272ed22c6bf52aa28913910.tar.gz |
Greatly simplified the internal hash/hmac and cipher functions.
Diffstat (limited to 'lib/gnutls_cipher_int.h')
-rw-r--r-- | lib/gnutls_cipher_int.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/gnutls_cipher_int.h b/lib/gnutls_cipher_int.h index fe8efa8851..81950f10fa 100644 --- a/lib/gnutls_cipher_int.h +++ b/lib/gnutls_cipher_int.h @@ -31,20 +31,16 @@ extern int crypto_cipher_prio; extern gnutls_crypto_cipher_st _gnutls_cipher_ops; -typedef struct -{ - const gnutls_crypto_single_cipher_st *cc; - void *ctx; -} reg_hd; +typedef int (*cipher_encrypt_func)(void* hd, const void* plaintext, size_t, void* ciphertext, size_t); +typedef int (*cipher_decrypt_func)(void* hd, const void* ciphertext, size_t, void* plaintext, size_t); +typedef void (*cipher_deinit_func)(void* hd); typedef struct { - int registered; /* true or false(0) */ - union - { - void *gc; /* when not registered */ - reg_hd rh; /* when registered */ - } hd; + void* handle; + cipher_encrypt_func encrypt; + cipher_decrypt_func decrypt; + cipher_deinit_func deinit; } cipher_hd_st; int _gnutls_cipher_init (cipher_hd_st *, gnutls_cipher_algorithm_t cipher, |