Adapted Phil Sutter's ARM fix in new codebase.
[cryptodev-linux.git] / lib / hash.h
blob1883beaaca579b9465c4c3b98d9a22383deb4fd0
1 #ifndef HASH_H
2 # define HASH_H
4 #include <stdint.h>
6 struct cryptodev_ctx {
7 int cfd;
8 struct session_op sess;
9 uint16_t alignmask;
12 int hash_ctx_init(struct cryptodev_ctx* ctx, int hash, int cfd);
13 void hash_ctx_deinit(struct cryptodev_ctx* ctx);
14 int hash(struct cryptodev_ctx* ctx, const void* text, size_t size, void* digest);
15 int hash_test(int algo, void (*user_hash)(void* text, int size, void* res));
17 int aead_test(int cipher, int mac, void* ukey, int ukey_size,
18 void* user_ctx, void (*user_combo)(void* user_ctx, void* plaintext, void* ciphertext, int size, void* res));
20 #endif