SHA512 support

This commit is contained in:
Love Hornquist Astrand
2010-09-29 23:37:34 -07:00
parent 5fc132d888
commit b32651c830
10 changed files with 68 additions and 11 deletions

View File

@@ -80,4 +80,22 @@ void SHA256_Init (SHA256_CTX *);
void SHA256_Update (SHA256_CTX *, const void *, size_t);
void SHA256_Final (void *, SHA256_CTX *);
/*
* SHA-2 512
*/
#define SHA512_DIGEST_LENGTH 64
struct hc_sha512state {
uint64_t sz[2];
uint64_t counter[8];
unsigned char save[128];
};
typedef struct hc_sha512state SHA512_CTX;
void SHA512_Init (SHA512_CTX *);
void SHA512_Update (SHA512_CTX *, const void *, size_t);
void SHA512_Final (void *, SHA512_CTX *);
#endif /* HEIM_SHA_H */