diff options
author | Jan Glauber <jang@de.ibm.com> | 2007-10-09 10:43:13 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:50 -0400 |
commit | 5265eeb2b036835021591173ac64e624baaff55c (patch) | |
tree | 0263f8e8db4ead27b6e02f3200e3a1305bbf2080 /arch/s390/crypto/sha1_s390.c | |
parent | ad5d27899fdbe7a66e57fdf1af883dbd7ff88dac (diff) |
[CRYPTO] sha: Add header file for SHA definitions
There are currently several SHA implementations that all define their own
initialization vectors and size values. Since this values are idential
move them to a header file under include/crypto.
Signed-off-by: Jan Glauber <jang@de.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/s390/crypto/sha1_s390.c')
-rw-r--r-- | arch/s390/crypto/sha1_s390.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c index 8ebd3cd6bd1f..5a834f6578ab 100644 --- a/arch/s390/crypto/sha1_s390.c +++ b/arch/s390/crypto/sha1_s390.c | |||
@@ -26,12 +26,10 @@ | |||
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/crypto.h> | 28 | #include <linux/crypto.h> |
29 | #include <crypto/sha.h> | ||
29 | 30 | ||
30 | #include "crypt_s390.h" | 31 | #include "crypt_s390.h" |
31 | 32 | ||
32 | #define SHA1_DIGEST_SIZE 20 | ||
33 | #define SHA1_BLOCK_SIZE 64 | ||
34 | |||
35 | struct s390_sha1_ctx { | 33 | struct s390_sha1_ctx { |
36 | u64 count; /* message length */ | 34 | u64 count; /* message length */ |
37 | u32 state[5]; | 35 | u32 state[5]; |
@@ -42,11 +40,11 @@ static void sha1_init(struct crypto_tfm *tfm) | |||
42 | { | 40 | { |
43 | struct s390_sha1_ctx *sctx = crypto_tfm_ctx(tfm); | 41 | struct s390_sha1_ctx *sctx = crypto_tfm_ctx(tfm); |
44 | 42 | ||
45 | sctx->state[0] = 0x67452301; | 43 | sctx->state[0] = SHA1_H0; |
46 | sctx->state[1] = 0xEFCDAB89; | 44 | sctx->state[1] = SHA1_H1; |
47 | sctx->state[2] = 0x98BADCFE; | 45 | sctx->state[2] = SHA1_H2; |
48 | sctx->state[3] = 0x10325476; | 46 | sctx->state[3] = SHA1_H3; |
49 | sctx->state[4] = 0xC3D2E1F0; | 47 | sctx->state[4] = SHA1_H4; |
50 | sctx->count = 0; | 48 | sctx->count = 0; |
51 | } | 49 | } |
52 | 50 | ||