[CRYPTO] tcrypt: Zero axbuf in the right function
[safe/jmp/linux-2.6] / crypto / sha1_generic.c
index 70364dd..68c62f5 100644 (file)
 #include <linux/crypto.h>
 #include <linux/cryptohash.h>
 #include <linux/types.h>
-#include <asm/scatterlist.h>
+#include <crypto/sha.h>
 #include <asm/byteorder.h>
 
-#define SHA1_DIGEST_SIZE       20
-#define SHA1_HMAC_BLOCK_SIZE   64
-
 struct sha1_ctx {
         u64 count;
         u32 state[5];
@@ -39,7 +36,7 @@ static void sha1_init(struct crypto_tfm *tfm)
        struct sha1_ctx *sctx = crypto_tfm_ctx(tfm);
        static const struct sha1_ctx initstate = {
          0,
-         { 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0 },
+         { SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4 },
          { 0, }
        };
 
@@ -111,7 +108,7 @@ static struct crypto_alg alg = {
        .cra_name       =       "sha1",
        .cra_driver_name=       "sha1-generic",
        .cra_flags      =       CRYPTO_ALG_TYPE_DIGEST,
-       .cra_blocksize  =       SHA1_HMAC_BLOCK_SIZE,
+       .cra_blocksize  =       SHA1_BLOCK_SIZE,
        .cra_ctxsize    =       sizeof(struct sha1_ctx),
        .cra_module     =       THIS_MODULE,
        .cra_alignmask  =       3,