summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac/hmac.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/hmac/hmac.h')
-rw-r--r--src/lib/libcrypto/hmac/hmac.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/libcrypto/hmac/hmac.h b/src/lib/libcrypto/hmac/hmac.h
index c6489c04c8..719fc408ac 100644
--- a/src/lib/libcrypto/hmac/hmac.h
+++ b/src/lib/libcrypto/hmac/hmac.h
@@ -58,17 +58,15 @@
58#ifndef HEADER_HMAC_H 58#ifndef HEADER_HMAC_H
59#define HEADER_HMAC_H 59#define HEADER_HMAC_H
60 60
61#include <openssl/opensslconf.h>
62
61#ifdef OPENSSL_NO_HMAC 63#ifdef OPENSSL_NO_HMAC
62#error HMAC is disabled. 64#error HMAC is disabled.
63#endif 65#endif
64 66
65#include <openssl/evp.h> 67#include <openssl/evp.h>
66 68
67#ifdef OPENSSL_FIPS 69#define HMAC_MAX_MD_CBLOCK 128 /* largest known is SHA512 */
68#define HMAC_MAX_MD_CBLOCK 128
69#else
70#define HMAC_MAX_MD_CBLOCK 64
71#endif
72 70
73#ifdef __cplusplus 71#ifdef __cplusplus
74extern "C" { 72extern "C" {
@@ -96,13 +94,12 @@ void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
96 const EVP_MD *md); /* deprecated */ 94 const EVP_MD *md); /* deprecated */
97void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 95void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
98 const EVP_MD *md, ENGINE *impl); 96 const EVP_MD *md, ENGINE *impl);
99void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len); 97void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
100void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); 98void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
101unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 99unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
102 const unsigned char *d, int n, unsigned char *md, 100 const unsigned char *d, size_t n, unsigned char *md,
103 unsigned int *md_len); 101 unsigned int *md_len);
104 102
105void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
106 103
107#ifdef __cplusplus 104#ifdef __cplusplus
108} 105}