diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-09 09:27:13 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-07-11 06:23:33 -0400 |
commit | e2a7ce4e185a94462698cc0e5192495ee3d22a2f (patch) | |
tree | 33013f177e48a3b4b191bfccfdb969cf0eeb8dbb /include/crypto | |
parent | 8267adab9433593adb09d94626475c2a5921f111 (diff) |
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>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/sha.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/crypto/sha.h b/include/crypto/sha.h index c0ccc2b1a2d8..922a248bd04d 100644 --- a/include/crypto/sha.h +++ b/include/crypto/sha.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #ifndef _CRYPTO_SHA_H | 5 | #ifndef _CRYPTO_SHA_H |
6 | #define _CRYPTO_SHA_H | 6 | #define _CRYPTO_SHA_H |
7 | 7 | ||
8 | #include <linux/types.h> | ||
9 | |||
8 | #define SHA1_DIGEST_SIZE 20 | 10 | #define SHA1_DIGEST_SIZE 20 |
9 | #define SHA1_BLOCK_SIZE 64 | 11 | #define SHA1_BLOCK_SIZE 64 |
10 | 12 | ||
@@ -62,4 +64,10 @@ | |||
62 | #define SHA512_H6 0x1f83d9abfb41bd6bULL | 64 | #define SHA512_H6 0x1f83d9abfb41bd6bULL |
63 | #define SHA512_H7 0x5be0cd19137e2179ULL | 65 | #define SHA512_H7 0x5be0cd19137e2179ULL |
64 | 66 | ||
67 | struct sha1_state { | ||
68 | u64 count; | ||
69 | u32 state[SHA1_DIGEST_SIZE / 4]; | ||
70 | u8 buffer[SHA1_BLOCK_SIZE]; | ||
71 | }; | ||
72 | |||
65 | #endif | 73 | #endif |