summaryrefslogtreecommitdiff
path: root/source3/lib/hmacmd5.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/hmacmd5.c')
-rw-r--r--source3/lib/hmacmd5.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/lib/hmacmd5.c b/source3/lib/hmacmd5.c
index e4a5995e11..f436fd30c0 100644
--- a/source3/lib/hmacmd5.c
+++ b/source3/lib/hmacmd5.c
@@ -49,8 +49,8 @@ void hmac_md5_init_rfc2104(uchar* key, int key_len, HMACMD5Context *ctx)
/* start out by storing key in pads */
ZERO_STRUCT(ctx->k_ipad);
ZERO_STRUCT(ctx->k_opad);
- bcopy( key, ctx->k_ipad, key_len);
- bcopy( key, ctx->k_opad, key_len);
+ memcpy( ctx->k_ipad, key, key_len);
+ memcpy( ctx->k_opad, key, key_len);
/* XOR key with ipad and opad values */
for (i=0; i<64; i++)
@@ -80,12 +80,11 @@ void hmac_md5_init_limK_to_64(const uchar* key, int key_len,
/* start out by storing key in pads */
ZERO_STRUCT(ctx->k_ipad);
ZERO_STRUCT(ctx->k_opad);
- bcopy( key, ctx->k_ipad, key_len);
- bcopy( key, ctx->k_opad, key_len);
+ memcpy( ctx->k_ipad, key, key_len);
+ memcpy( ctx->k_opad, key, key_len);
/* XOR key with ipad and opad values */
- for (i=0; i<64; i++)
- {
+ for (i=0; i<64; i++) {
ctx->k_ipad[i] ^= 0x36;
ctx->k_opad[i] ^= 0x5c;
}