diff options
author | Richard Levitte <levitte@openssl.org> | 2015-11-30 13:34:20 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:39:23 +0100 |
commit | 3f43aecc599a5a729609deca7d98a677334ab3b8 (patch) | |
tree | 45ef668898a6c9fa7120e0c22badf8a2937a7eb8 /include/openssl/hmac.h | |
parent | ab0a14bbc7bc7cdda4cfb2b2a730804b3437429f (diff) | |
download | openssl-3f43aecc599a5a729609deca7d98a677334ab3b8.tar.gz |
Make the definition of HMAC_CTX opaque
This moves the definition to crypto/hmac/hmac_lcl.h. Constructor and
destructor added, and the typedef moved to include/openssl/ossl_typ.h.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include/openssl/hmac.h')
-rw-r--r-- | include/openssl/hmac.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/include/openssl/hmac.h b/include/openssl/hmac.h index 47aa1e6fa8..48aade3d9e 100644 --- a/include/openssl/hmac.h +++ b/include/openssl/hmac.h @@ -68,18 +68,9 @@ extern "C" { #endif -typedef struct hmac_ctx_st { - const EVP_MD *md; - EVP_MD_CTX *md_ctx; - EVP_MD_CTX *i_ctx; - EVP_MD_CTX *o_ctx; - unsigned int key_length; - unsigned char key[HMAC_MAX_MD_CBLOCK]; -} HMAC_CTX; - -# define HMAC_CTX_EMPTY { NULL, NULL, NULL, NULL, 0, "" } -# define HMAC_size(e) (EVP_MD_size((e)->md)) - +size_t HMAC_size(HMAC_CTX *e); +HMAC_CTX *HMAC_CTX_new(void); +void HMAC_CTX_free(HMAC_CTX *ctx); int HMAC_CTX_init(HMAC_CTX *ctx); void HMAC_CTX_cleanup(HMAC_CTX *ctx); |