From 62299aa7475bad48ba3e230596f09e794c2b4ce5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Feb 2002 17:40:43 +0000 Subject: bcopy must DIE ! Stop people creeping use of bcopy back into the code (and yes I know who you are..... :-). Jeremy. (This used to be commit 330b0df960329bcf4696b8fa4a7357e6c456f74e) --- source3/lib/hmacmd5.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source3/lib') 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; } -- cgit