X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fcrypto%2Fsha.h;h=069e85ba97e1874a6f92cb98dc0f4794e8969249;hb=003d6a38ce1a59e0053a02fd9e9a65b588bc8e33;hp=c0ccc2b1a2d82eb21d2b34cfa2eb292297c2dd56;hpb=75659ca0c10992dcb39258518368a0f6f56e935d;p=karo-tx-linux.git 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 @@ #ifndef _CRYPTO_SHA_H #define _CRYPTO_SHA_H +#include + #define SHA1_DIGEST_SIZE 20 #define SHA1_BLOCK_SIZE 64 @@ -62,4 +64,22 @@ #define SHA512_H6 0x1f83d9abfb41bd6bULL #define SHA512_H7 0x5be0cd19137e2179ULL +struct sha1_state { + u64 count; + u32 state[SHA1_DIGEST_SIZE / 4]; + u8 buffer[SHA1_BLOCK_SIZE]; +}; + +struct sha256_state { + u64 count; + u32 state[SHA256_DIGEST_SIZE / 4]; + u8 buf[SHA256_BLOCK_SIZE]; +}; + +struct sha512_state { + u64 count[2]; + u64 state[SHA512_DIGEST_SIZE / 8]; + u8 buf[SHA512_BLOCK_SIZE]; +}; + #endif