diff options
Diffstat (limited to 'include/crypto/sha.h')
-rw-r--r-- | include/crypto/sha.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/crypto/sha.h b/include/crypto/sha.h index c0ccc2b1a2d8..069e85ba97e1 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,22 @@ | |||
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 | |||
73 | struct sha256_state { | ||
74 | u64 count; | ||
75 | u32 state[SHA256_DIGEST_SIZE / 4]; | ||
76 | u8 buf[SHA256_BLOCK_SIZE]; | ||
77 | }; | ||
78 | |||
79 | struct sha512_state { | ||
80 | u64 count[2]; | ||
81 | u64 state[SHA512_DIGEST_SIZE / 8]; | ||
82 | u8 buf[SHA512_BLOCK_SIZE]; | ||
83 | }; | ||
84 | |||
65 | #endif | 85 | #endif |