diff options
Diffstat (limited to 'source4/lib/crypto')
-rw-r--r-- | source4/lib/crypto/hmacmd5.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source4/lib/crypto/hmacmd5.c b/source4/lib/crypto/hmacmd5.c index 8ca7dba841..7697ac8a69 100644 --- a/source4/lib/crypto/hmacmd5.c +++ b/source4/lib/crypto/hmacmd5.c @@ -77,20 +77,7 @@ void hmac_md5_init_limK_to_64(const uchar* key, int key_len, key_len = 64; } - /* start out by storing key in pads */ - ZERO_STRUCT(ctx->k_ipad); - ZERO_STRUCT(ctx->k_opad); - 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++) { - ctx->k_ipad[i] ^= 0x36; - ctx->k_opad[i] ^= 0x5c; - } - - MD5Init(&ctx->ctx); - MD5Update(&ctx->ctx, ctx->k_ipad, 64); + hmac_md5_init_rfc2104(key, key_len, ctx); } /*********************************************************************** |