diff options
author | Russ Cox <rsc@golang.org> | 2017-09-07 12:14:31 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2017-09-18 00:15:39 +0000 |
commit | 8fa8f42cb37648a3c0754552c7397aeb3f36d921 (patch) | |
tree | 17552c2746ab7818d4328c5544f52b1094bd9d02 /src/crypto/internal/boring/goboringcrypto.h | |
parent | 07f6ce9d391df3b173772d4b12eff2d5c98bdd9c (diff) | |
download | go-8fa8f42cb37648a3c0754552c7397aeb3f36d921.tar.gz go-8fa8f42cb37648a3c0754552c7397aeb3f36d921.zip |
[dev.boringcrypto] crypto/internal/boring: allow hmac operations after Sum
hmac.New returns a hash.Hash, which defines Sum as:
// Sum appends the current hash to b and returns the resulting slice.
// It does not change the underlying hash state.
Sum(b []byte) []byte
I've now seen two different pieces of code that make
use of the assumption that Sum has no effect on the
internal state, so make it so.
Test in next CL in stack, so that it can be cherry-picked
to master.
Change-Id: Iad84ab3e2cc12dbecef25c3fc8f2662d157b0d0b
Reviewed-on: https://go-review.googlesource.com/63910
Reviewed-by: Adam Langley <agl@golang.org>
Diffstat (limited to 'src/crypto/internal/boring/goboringcrypto.h')
-rw-r--r-- | src/crypto/internal/boring/goboringcrypto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/internal/boring/goboringcrypto.h b/src/crypto/internal/boring/goboringcrypto.h index 2cc327f16c..f982ce83c2 100644 --- a/src/crypto/internal/boring/goboringcrypto.h +++ b/src/crypto/internal/boring/goboringcrypto.h @@ -90,6 +90,7 @@ int _goboringcrypto_HMAC_Init(GO_HMAC_CTX*, const void*, int, const GO_EVP_MD*); int _goboringcrypto_HMAC_Update(GO_HMAC_CTX*, const uint8_t*, size_t); int _goboringcrypto_HMAC_Final(GO_HMAC_CTX*, uint8_t*, unsigned int*); size_t _goboringcrypto_HMAC_size(const GO_HMAC_CTX*); +int _goboringcrypto_HMAC_CTX_copy_ex(GO_HMAC_CTX *dest, const GO_HMAC_CTX *src); // #include <openssl/aes.h> typedef struct GO_AES_KEY { char data[244]; } GO_AES_KEY; |