You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
538 B

  1. --- a/hmac_md5.c
  2. +++ b/hmac_md5.c
  3. @@ -356,10 +356,10 @@ caddr_t digest; /* caller digest to be filled in */
  4. */
  5. /* start out by storing key in pads */
  6. - bzero(k_ipad, sizeof k_ipad);
  7. - bzero(k_opad, sizeof k_opad);
  8. - bcopy(key, k_ipad, key_len);
  9. - bcopy( key, k_opad, key_len);
  10. + memset(k_ipad, 0, sizeof k_ipad);
  11. + memset(k_opad, 0, sizeof k_opad);
  12. + memcpy(k_ipad, key, key_len);
  13. + memcpy(k_opad, key, key_len);
  14. /* XOR key with ipad and opad values */
  15. for(i = 0; i < 64; ++i)