summaryrefslogtreecommitdiffstats
path: root/crypto/hmac
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-05-15 11:29:55 +0000
committerAndy Polyakov <appro@openssl.org>2004-05-15 11:29:55 +0000
commit9e0aad9fd60635e240f7742fa1497eced6f1cd0b (patch)
tree3bcdb1f59b421e626a2c94ea743ccc4d18628c1c /crypto/hmac
parent1c7a0e2856bce20267174375fd66007fa172354d (diff)
size_t-fication of message digest APIs. We should size_t-fy more APIs...
Diffstat (limited to 'crypto/hmac')
-rw-r--r--crypto/hmac/hmac.c4
-rw-r--r--crypto/hmac/hmac.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/hmac/hmac.c b/crypto/hmac/hmac.c
index f7392a0dae..50765e227b 100644
--- a/crypto/hmac/hmac.c
+++ b/crypto/hmac/hmac.c
@@ -121,7 +121,7 @@ void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
HMAC_Init_ex(ctx,key,len,md, NULL);
}
-void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len)
+void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
{
EVP_DigestUpdate(&ctx->md_ctx,data,len);
}
@@ -156,7 +156,7 @@ void HMAC_CTX_cleanup(HMAC_CTX *ctx)
}
unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
- const unsigned char *d, int n, unsigned char *md,
+ const unsigned char *d, size_t n, unsigned char *md,
unsigned int *md_len)
{
HMAC_CTX c;
diff --git a/crypto/hmac/hmac.h b/crypto/hmac/hmac.h
index 72077ad19e..251c95fade 100644
--- a/crypto/hmac/hmac.h
+++ b/crypto/hmac/hmac.h
@@ -94,10 +94,10 @@ void HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md); /* deprecated */
void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl);
-void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, int len);
+void HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
void HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
- const unsigned char *d, int n, unsigned char *md,
+ const unsigned char *d, size_t n, unsigned char *md,
unsigned int *md_len);