]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/s390/crypto/sha1_s390.c
[CRYPTO] sha: Add header file for SHA definitions
[linux-2.6-omap-h63xx.git] / arch / s390 / crypto / sha1_s390.c
index 8ebd3cd6bd1fd2adc3a361a9d0d33e52ba1ed7b3..5a834f6578ab85827c6a1416d788280c72322c47 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/crypto.h>
+#include <crypto/sha.h>
 
 #include "crypt_s390.h"
 
-#define SHA1_DIGEST_SIZE       20
-#define SHA1_BLOCK_SIZE                64
-
 struct s390_sha1_ctx {
        u64 count;              /* message length */
        u32 state[5];
@@ -42,11 +40,11 @@ static void sha1_init(struct crypto_tfm *tfm)
 {
        struct s390_sha1_ctx *sctx = crypto_tfm_ctx(tfm);
 
-       sctx->state[0] = 0x67452301;
-       sctx->state[1] = 0xEFCDAB89;
-       sctx->state[2] = 0x98BADCFE;
-       sctx->state[3] = 0x10325476;
-       sctx->state[4] = 0xC3D2E1F0;
+       sctx->state[0] = SHA1_H0;
+       sctx->state[1] = SHA1_H1;
+       sctx->state[2] = SHA1_H2;
+       sctx->state[3] = SHA1_H3;
+       sctx->state[4] = SHA1_H4;
        sctx->count = 0;
 }