search for: sha_long

Displaying 1 result from an estimated 1 matches for "sha_long".

Did you mean: s_long
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
...length); +} + +void sha1_result(SHA_CTX *ctx, void *digest) +{ + HASH_FINAL(digest, ctx); +} +#endif diff --git a/lib/sha1.h b/lib/sha1.h new file mode 100644 index 0000000000000..ea979e4a31ef7 --- /dev/null +++ b/lib/sha1.h @@ -0,0 +1,20 @@ +#ifndef __LIB__SHA1__ +#define __LIB__SHA1__ + +# define SHA_LONG unsigned int +# define SHA_LBLOCK 16 +# define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a + * contiguous array of 32 bit wide + * big-endian values. */ +# define SHA_LAST_BLOCK (SHA_CBLOCK-8) +# define SHA_DIGEST_LENGTH 20 + + +typedef struct SHAstate_st { + SHA_LONG...