diff options
author | Andy Polyakov <appro@openssl.org> | 2004-05-31 12:26:18 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2004-05-31 12:26:18 +0000 |
commit | 7997b13aa3b1e194306a510747e7f4a3907598f1 (patch) | |
tree | 64cd471d53092578bd6438378ae5ad16f1ae1f4b /crypto/sha/sha.h | |
parent | a2eb9688a4e63eb78e2068986d0cfacd501aa30e (diff) |
Final SHA-256/-512 touches. Extra md_len field in SHA[256|512]_CTX
reserves for truncated hash function output mode and makes SHA224
thread-safe. Next stop is integration with EVP and we're done...
Diffstat (limited to 'crypto/sha/sha.h')
-rw-r--r-- | crypto/sha/sha.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/crypto/sha/sha.h b/crypto/sha/sha.h index f4dd5277c2..47536d9c4b 100644 --- a/crypto/sha/sha.h +++ b/crypto/sha/sha.h @@ -130,18 +130,13 @@ typedef struct SHA256state_st SHA_LONG h[8]; SHA_LONG Nl,Nh; SHA_LONG data[SHA_LBLOCK]; - int num; + unsigned int num,md_len; } SHA256_CTX; #ifndef OPENSSL_NO_SHA256 int SHA224_Init(SHA256_CTX *c); -#if 0 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); int SHA224_Final(unsigned char *md, SHA256_CTX *c); -#else -#define SHA224_Update(c,data,len) SHA256_Update((c),(data),(len)) -#define SHA224_Final(md,c) SHA256_Final((md),(c)) -#endif unsigned char *SHA224(const unsigned char *d, size_t n,unsigned char *md); int SHA256_Init(SHA256_CTX *c); int SHA256_Update(SHA256_CTX *c, const void *data, size_t len); @@ -177,7 +172,7 @@ typedef struct SHA512state_st SHA_LONG64 d[SHA_LBLOCK]; unsigned char p[SHA512_CBLOCK]; } u; - int num; + unsigned int num,md_len; } SHA512_CTX; #ifndef OPENSSL_NO_SHA512 |