summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-02-26 17:40:43 +0000
committerJeremy Allison <jra@samba.org>2002-02-26 17:40:43 +0000
commit62299aa7475bad48ba3e230596f09e794c2b4ce5 (patch)
tree7ef38a07a3d7279135e23af343cc4a828e454ac3 /source3/lib
parent97d96862ca84f599ee6fed0910389e07d46ee91d (diff)
downloadsamba-62299aa7475bad48ba3e230596f09e794c2b4ce5.tar.gz
samba-62299aa7475bad48ba3e230596f09e794c2b4ce5.tar.bz2
samba-62299aa7475bad48ba3e230596f09e794c2b4ce5.zip
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)
Diffstat (limited to 'source3/lib')
-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;
}