]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/hmac.c
Eliminate dependency on man2html.
[bacula/bacula] / bacula / src / lib / hmac.c
index 8c79f98c2bcc6069a1353516eeadf14996b76274..7dade4c1367feeecefad52c8ce4769eadc913cca 100644 (file)
@@ -2,13 +2,13 @@
  *  Hashed Message Authentication Code using MD5 (HMAC-MD5)
  *
  * hmac_md5 was based on sample code in RFC2104 (thanks guys).
- * 
+ *
  * Adapted to Bacula by Kern E. Sibbald, February MMI.
  *
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2004 Kern Sibbald and John Walker
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -29,8 +29,8 @@
 
 #include "bacula.h"
 
-#define PAD_LEN 64                   /* PAD length */
-#define SIG_LEN 16                   /* MD5 signature length */
+#define PAD_LEN 64           /* PAD length */
+#define SIG_LEN MD5HashSize  /* MD5 digest length */
 
 void
 hmac_md5(
@@ -73,7 +73,7 @@ hmac_md5(
    /* Zero pads and store key */
    memset(k_ipad, 0, PAD_LEN);
    memcpy(k_ipad, key, key_len);
-   memcpy(k_opad, k_ipad, PAD_LEN); 
+   memcpy(k_opad, k_ipad, PAD_LEN);
 
    /* XOR key with ipad and opad values */
    for (i=0; i<PAD_LEN; i++) {