diff options
Diffstat (limited to 'crypto/sha1_generic.c')
-rw-r--r-- | crypto/sha1_generic.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c index 70364dd5c45a..48a3c3e0bf5f 100644 --- a/crypto/sha1_generic.c +++ b/crypto/sha1_generic.c | |||
@@ -22,12 +22,10 @@ | |||
22 | #include <linux/crypto.h> | 22 | #include <linux/crypto.h> |
23 | #include <linux/cryptohash.h> | 23 | #include <linux/cryptohash.h> |
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <crypto/sha.h> | ||
25 | #include <asm/scatterlist.h> | 26 | #include <asm/scatterlist.h> |
26 | #include <asm/byteorder.h> | 27 | #include <asm/byteorder.h> |
27 | 28 | ||
28 | #define SHA1_DIGEST_SIZE 20 | ||
29 | #define SHA1_HMAC_BLOCK_SIZE 64 | ||
30 | |||
31 | struct sha1_ctx { | 29 | struct sha1_ctx { |
32 | u64 count; | 30 | u64 count; |
33 | u32 state[5]; | 31 | u32 state[5]; |
@@ -39,7 +37,7 @@ static void sha1_init(struct crypto_tfm *tfm) | |||
39 | struct sha1_ctx *sctx = crypto_tfm_ctx(tfm); | 37 | struct sha1_ctx *sctx = crypto_tfm_ctx(tfm); |
40 | static const struct sha1_ctx initstate = { | 38 | static const struct sha1_ctx initstate = { |
41 | 0, | 39 | 0, |
42 | { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 }, | 40 | { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 }, |
43 | { 0, } | 41 | { 0, } |
44 | }; | 42 | }; |
45 | 43 | ||
@@ -111,7 +109,7 @@ static struct crypto_alg alg = { | |||
111 | .cra_name = "sha1", | 109 | .cra_name = "sha1", |
112 | .cra_driver_name= "sha1-generic", | 110 | .cra_driver_name= "sha1-generic", |
113 | .cra_flags = CRYPTO_ALG_TYPE_DIGEST, | 111 | .cra_flags = CRYPTO_ALG_TYPE_DIGEST, |
114 | .cra_blocksize = SHA1_HMAC_BLOCK_SIZE, | 112 | .cra_blocksize = SHA1_BLOCK_SIZE, |
115 | .cra_ctxsize = sizeof(struct sha1_ctx), | 113 | .cra_ctxsize = sizeof(struct sha1_ctx), |
116 | .cra_module = THIS_MODULE, | 114 | .cra_module = THIS_MODULE, |
117 | .cra_alignmask = 3, | 115 | .cra_alignmask = 3, |