summaryrefslogtreecommitdiff
path: root/source4/lib/crypto/hmacmd5.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/crypto/hmacmd5.c')
-rw-r--r--source4/lib/crypto/hmacmd5.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source4/lib/crypto/hmacmd5.c b/source4/lib/crypto/hmacmd5.c
index 0a7cbb3663..0d52e36858 100644
--- a/source4/lib/crypto/hmacmd5.c
+++ b/source4/lib/crypto/hmacmd5.c
@@ -28,14 +28,14 @@
/***********************************************************************
the rfc 2104 version of hmac_md5 initialisation.
***********************************************************************/
-void hmac_md5_init_rfc2104(uchar* key, int key_len, HMACMD5Context *ctx)
+void hmac_md5_init_rfc2104(uint8_t *key, int key_len, HMACMD5Context *ctx)
{
int i;
/* if key is longer than 64 bytes reset it to key=MD5(key) */
if (key_len > 64)
{
- uchar tk[16];
+ uint8_t tk[16];
struct MD5Context tctx;
MD5Init(&tctx);
@@ -66,7 +66,7 @@ void hmac_md5_init_rfc2104(uchar* key, int key_len, HMACMD5Context *ctx)
/***********************************************************************
the microsoft version of hmac_md5 initialisation.
***********************************************************************/
-void hmac_md5_init_limK_to_64(const uchar* key, int key_len,
+void hmac_md5_init_limK_to_64(const uint8_t *key, int key_len,
HMACMD5Context *ctx)
{
/* if key is longer than 64 bytes truncate it */
@@ -81,7 +81,7 @@ void hmac_md5_init_limK_to_64(const uchar* key, int key_len,
/***********************************************************************
update hmac_md5 "inner" buffer
***********************************************************************/
-void hmac_md5_update(const uchar* text, int text_len, HMACMD5Context *ctx)
+void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context *ctx)
{
MD5Update(&ctx->ctx, text, text_len); /* then text of datagram */
}
@@ -89,8 +89,7 @@ void hmac_md5_update(const uchar* text, int text_len, HMACMD5Context *ctx)
/***********************************************************************
finish off hmac_md5 "inner" buffer and generate outer one.
***********************************************************************/
-void hmac_md5_final(uchar *digest, HMACMD5Context *ctx)
-
+void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx)
{
struct MD5Context ctx_o;
@@ -106,7 +105,7 @@ void hmac_md5_final(uchar *digest, HMACMD5Context *ctx)
single function to calculate an HMAC MD5 digest from data.
use the microsoft hmacmd5 init method because the key is 16 bytes.
************************************************************/
-void hmac_md5(const uchar key[16], const uchar *data, int data_len, uchar* digest)
+void hmac_md5(const uint8_t key[16], const uint8_t *data, int data_len, uint8_t *digest)
{
HMACMD5Context ctx;
hmac_md5_init_limK_to_64(key, 16, &ctx);
@@ -116,4 +115,3 @@ void hmac_md5(const uchar key[16], const uchar *data, int data_len, uchar* diges
}
hmac_md5_final(digest, &ctx);
}
-