From 12dff9801f92d37c330ccf4776da36a3910abec4 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 22 Jun 2013 22:23:22 +0200 Subject: Add HMAC-SHA512 to hash --- src/hash.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/hash.h') diff --git a/src/hash.h b/src/hash.h index 536ab71165..880468a2d2 100644 --- a/src/hash.h +++ b/src/hash.h @@ -123,4 +123,14 @@ inline uint160 Hash160(const std::vector& vch) unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector& vDataToHash); +typedef struct +{ + SHA512_CTX ctxInner; + SHA512_CTX ctxOuter; +} HMAC_SHA512_CTX; + +int HMAC_SHA512_Init(HMAC_SHA512_CTX *pctx, const void *pkey, size_t len); +int HMAC_SHA512_Update(HMAC_SHA512_CTX *pctx, const void *pdata, size_t len); +int HMAC_SHA512_Final(unsigned char *pmd, HMAC_SHA512_CTX *pctx); + #endif -- cgit v1.2.3