diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-15 14:30:06 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-17 20:49:04 +0200 |
commit | 780a3de303e5cf7534123aa8a9518ed74537659b (patch) | |
tree | 870c8cb0269db147811775514baa684fd5ccdbcf /cryptodev_int.h | |
parent | b8444429562c8eda11c9c72f180092fa6841213f (diff) | |
download | kernel-crypto-780a3de303e5cf7534123aa8a9518ed74537659b.tar.gz kernel-crypto-780a3de303e5cf7534123aa8a9518ed74537659b.tar.xz kernel-crypto-780a3de303e5cf7534123aa8a9518ed74537659b.zip |
Added generic sessions to allow encryption/decryption hash and HMAC.
Removed the ncr-cipher.c.
Diffstat (limited to 'cryptodev_int.h')
-rw-r--r-- | cryptodev_int.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cryptodev_int.h b/cryptodev_int.h index 5d4ebfefc2b..7d2e83f7104 100644 --- a/cryptodev_int.h +++ b/cryptodev_int.h @@ -40,7 +40,12 @@ int cryptodev_cipher_init(struct cipher_data* out, const char* alg_name, uint8_t void cryptodev_cipher_deinit(struct cipher_data* cdata); ssize_t cryptodev_cipher_decrypt( struct cipher_data* cdata, struct scatterlist *sg1, struct scatterlist *sg2, size_t len); ssize_t cryptodev_cipher_encrypt( struct cipher_data* cdata, struct scatterlist *sg1, struct scatterlist *sg2, size_t len); + int cryptodev_cipher_set_iv(struct cipher_data* cdata, void* iv, size_t iv_size); +int _cryptodev_cipher_decrypt(struct cipher_data* cdata, const void* ciphertext, + size_t ciphertext_size, void* plaintext, size_t plaintext_size); +int _cryptodev_cipher_encrypt(struct cipher_data* cdata, const void* plaintext, + size_t plaintext_size, void* ciphertext, size_t ciphertext_size); /* hash stuff */ struct hash_data @@ -56,6 +61,7 @@ struct hash_data int cryptodev_hash_final( struct hash_data* hdata, void* output); ssize_t cryptodev_hash_update( struct hash_data* hdata, struct scatterlist *sg, size_t len); +ssize_t _cryptodev_hash_update( struct hash_data* hdata, const void* data, size_t len); int cryptodev_hash_reset( struct hash_data* hdata); void cryptodev_hash_deinit(struct hash_data* hdata); int cryptodev_hash_init( struct hash_data* hdata, const char* alg_name, int hmac_mode, void* mackey, size_t mackeylen); |