diff options
Diffstat (limited to 'src/crypto/hmac_sha256.h')
| -rw-r--r-- | src/crypto/hmac_sha256.h | 5 |
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); |