aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/hmac_sha256.h
diff options
context:
space:
mode:
authorPatrick Lodder <[email protected]>2021-07-12 01:03:05 +0200
committerGitHub <[email protected]>2021-07-12 01:03:05 +0200
commitb1a924969057693a55c458ab53894f677abe1823 (patch)
tree389dffcde9239314e72c2bd5e05c2b74aec3f2a0 /src/crypto/hmac_sha256.h
parentMerge pull request #2288 from fdoving/fdov-depends-libevent (diff)
parentAdd warning log message if overriding -blockmintxfee (diff)
downloaddiscoin-1.21-dev.tar.xz
discoin-1.21-dev.zip
Merge pull request #2311 from rnicoll/1.21-subsidy-tests1.21-dev
Rewrite subsidy limit tests (1.21)
Diffstat (limited to 'src/crypto/hmac_sha256.h')
-rw-r--r--src/crypto/hmac_sha256.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crypto/hmac_sha256.h b/src/crypto/hmac_sha256.h
index d31fda1dd..5bdc9bc59 100644
--- a/src/crypto/hmac_sha256.h
+++ b/src/crypto/hmac_sha256.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <stdlib.h>
+#include <string.h>
/** A hasher class for HMAC-SHA-256. */
class CHMAC_SHA256
@@ -21,6 +22,10 @@ public:
static const size_t OUTPUT_SIZE = 32;
CHMAC_SHA256(const unsigned char* key, size_t keylen);
+ void Copy(CHMAC_SHA256* dest)
+ {
+ memcpy(dest, this, sizeof(CHMAC_SHA256));
+ }
CHMAC_SHA256& Write(const unsigned char* data, size_t len)
{
inner.Write(data, len);