aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hmac
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/hmac')
-rw-r--r--crypto/hmac/hmac.c7
-rw-r--r--crypto/hmac/hmac.h7
2 files changed, 8 insertions, 6 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index 0825536393..5c349bbb56 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -60,7 +60,7 @@
#include <string.h>
#include <openssl/hmac.h>
-void HMAC_Init(HMAC_CTX *ctx, const unsigned char *key, int len,
+void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md)
{
int i,j,reset=0;
@@ -133,8 +133,9 @@ void HMAC_cleanup(HMAC_CTX *ctx)
memset(ctx,0,sizeof(HMAC_CTX));
}
-unsigned char *HMAC(const EVP_MD *evp_md, const unsigned char *key, int key_len,
- unsigned char *d, int n, unsigned char *md, unsigned int *md_len)
+unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
+ unsigned char *d, int n, unsigned char *md,
+ unsigned int *md_len)
{
HMAC_CTX c;
static unsigned char m[EVP_MAX_MD_SIZE];
diff --git a/crypto/hmac/hmac.h b/crypto/hmac/hmac.h
index 57204985d3..f928975fcd 100644
--- a/crypto/hmac/hmac.h
+++ b/crypto/hmac/hmac.h
@@ -83,13 +83,14 @@ typedef struct hmac_ctx_st
#define HMAC_size(e) (EVP_MD_size((e)->md))
-void HMAC_Init(HMAC_CTX *ctx, const unsigned char *key, int len,
+void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md);
void HMAC_Update(HMAC_CTX *ctx,unsigned char *key, int len);
void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
void HMAC_cleanup(HMAC_CTX *ctx);
-unsigned char *HMAC(const EVP_MD *evp_md, const unsigned char *key, int key_len,
- unsigned char *d, int n, unsigned char *md, unsigned int *md_len);
+unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
+ unsigned char *d, int n, unsigned char *md,
+ unsigned int *md_len);
#ifdef __cplusplus