diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-06-01 08:30:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:23 -0500 |
commit | 98d291423ff581786a369ce373c861f94c654aa0 (patch) | |
tree | cfcc2391f71a4f3373c5fff359a285aeee558639 /source4/lib/crypto | |
parent | fa2e9ec311b99dee2fbff5ee5fa2c743298dacad (diff) | |
download | samba-98d291423ff581786a369ce373c861f94c654aa0.tar.gz samba-98d291423ff581786a369ce373c861f94c654aa0.tar.bz2 samba-98d291423ff581786a369ce373c861f94c654aa0.zip |
r961: convert 'uchar' to 'uint8_t'
metze
(This used to be commit 9f914e4af99e18b469d4cf9d8b1514a2bd28ddec)
Diffstat (limited to 'source4/lib/crypto')
-rw-r--r-- | source4/lib/crypto/hmacmd5.c | 14 |
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); } - |