aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2013-06-22 22:23:22 +0200
committerPieter Wuille <[email protected]>2013-06-24 00:56:45 +0200
commit12dff9801f92d37c330ccf4776da36a3910abec4 (patch)
treee0c6123959759ec57ee6fff354a41f548bedb770 /src/hash.h
parentMerge pull request #2592 from sipa/dumpwallet (diff)
downloaddiscoin-12dff9801f92d37c330ccf4776da36a3910abec4.tar.xz
discoin-12dff9801f92d37c330ccf4776da36a3910abec4.zip
Add HMAC-SHA512 to hash
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h
index 536ab7116..880468a2d 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -123,4 +123,14 @@ inline uint160 Hash160(const std::vector<unsigned char>& vch)
unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& 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