mirror of
https://github.com/AntelopeIO/boringssl.git
synced 2026-07-21 14:43:53 +00:00
Add HMAC_CTX_get_md.
CPython uses this function. Change-Id: I03ead7f54ad19e2a0b2ea3b142298cc1e55c3c90 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/53967 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
committed by
Boringssl LUCI CQ
parent
401137fec2
commit
d45d8933e6
@@ -224,9 +224,9 @@ int HMAC_Final(HMAC_CTX *ctx, uint8_t *out, unsigned int *out_len) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
size_t HMAC_size(const HMAC_CTX *ctx) {
|
||||
return EVP_MD_size(ctx->md);
|
||||
}
|
||||
size_t HMAC_size(const HMAC_CTX *ctx) { return EVP_MD_size(ctx->md); }
|
||||
|
||||
const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx) { return ctx->md; }
|
||||
|
||||
int HMAC_CTX_copy_ex(HMAC_CTX *dest, const HMAC_CTX *src) {
|
||||
if (!EVP_MD_CTX_copy_ex(&dest->i_ctx, &src->i_ctx) ||
|
||||
|
||||
@@ -137,6 +137,9 @@ OPENSSL_EXPORT int HMAC_Final(HMAC_CTX *ctx, uint8_t *out,
|
||||
// |ctx|. On entry, |ctx| must have been setup with |HMAC_Init_ex|.
|
||||
OPENSSL_EXPORT size_t HMAC_size(const HMAC_CTX *ctx);
|
||||
|
||||
// HMAC_CTX_get_md returns |ctx|'s hash function.
|
||||
OPENSSL_EXPORT const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
|
||||
|
||||
// HMAC_CTX_copy_ex sets |dest| equal to |src|. On entry, |dest| must have been
|
||||
// initialised by calling |HMAC_CTX_init|. It returns one on success and zero
|
||||
// on error.
|
||||
|
||||
Reference in New Issue
Block a user