crypto: sha1_generic - Add export/import support
This patch adds export/import support to sha1_generic. The exported type is defined by struct sha1_state, which is basically the entire descriptor state of sha1_generic. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#ifndef _CRYPTO_SHA_H
|
||||
#define _CRYPTO_SHA_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define SHA1_DIGEST_SIZE 20
|
||||
#define SHA1_BLOCK_SIZE 64
|
||||
|
||||
@@ -62,4 +64,10 @@
|
||||
#define SHA512_H6 0x1f83d9abfb41bd6bULL
|
||||
#define SHA512_H7 0x5be0cd19137e2179ULL
|
||||
|
||||
struct sha1_state {
|
||||
u64 count;
|
||||
u32 state[SHA1_DIGEST_SIZE / 4];
|
||||
u8 buffer[SHA1_BLOCK_SIZE];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user