]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/md5passwd.c
Fix source file header text duplication text duplication.
[thirdparty/cups.git] / cups / md5passwd.c
index 1b9029a29507ca060cbffd5d1109d251d868ca55..a9817aaa22583afacf1074da6741baca7ab77a52 100644 (file)
@@ -1,42 +1,24 @@
 /*
- * "$Id: md5passwd.c 4828 2005-11-11 12:53:38Z mike $"
+ * MD5 password support for CUPS.
  *
- *   MD5 password support for the Common UNIX Printing System (CUPS).
+ * Copyright 2007-2010 by Apple Inc.
+ * Copyright 1997-2005 by Easy Software Products.
  *
- *   Copyright 1997-2005 by Easy Software Products.
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * missing or damaged, see the license at "http://www.cups.org/".
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
- *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   httpMD5()       - Compute the MD5 sum of the username:group:password.
- *   httpMD5Nonce()  - Combine the MD5 sum of the username, group, and password
- *                     with the server-supplied nonce value.
- *   httpMD5String() - Convert an MD5 sum to a character string.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
  * Include necessary headers...
  */
 
-#include "http.h"
-#include "string.h"
+#include "http-private.h"
+#include "string-private.h"
 
 
 /*
@@ -59,9 +41,9 @@ httpMD5(const char *username,         /* I - User name */
   */
 
   snprintf(line, sizeof(line), "%s:%s:%s", username, realm, passwd);
-  _cups_md5_init(&state);
-  _cups_md5_append(&state, (unsigned char *)line, (int)strlen(line));
-  _cups_md5_finish(&state, sum);
+  _cupsMD5Init(&state);
+  _cupsMD5Append(&state, (unsigned char *)line, (int)strlen(line));
+  _cupsMD5Finish(&state, sum);
 
  /*
   * Return the sum...
@@ -94,9 +76,9 @@ httpMD5Final(const char *nonce,               /* I - Server nonce value */
   */
 
   snprintf(line, sizeof(line), "%s:%s", method, resource);
-  _cups_md5_init(&state);
-  _cups_md5_append(&state, (unsigned char *)line, (int)strlen(line));
-  _cups_md5_finish(&state, sum);
+  _cupsMD5Init(&state);
+  _cupsMD5Append(&state, (unsigned char *)line, (int)strlen(line));
+  _cupsMD5Finish(&state, sum);
   httpMD5String(sum, a2);
 
  /*
@@ -107,9 +89,9 @@ httpMD5Final(const char *nonce,              /* I - Server nonce value */
 
   snprintf(line, sizeof(line), "%s:%s:%s", md5, nonce, a2);
 
-  _cups_md5_init(&state);
-  _cups_md5_append(&state, (unsigned char *)line, (int)strlen(line));
-  _cups_md5_finish(&state, sum);
+  _cupsMD5Init(&state);
+  _cupsMD5Append(&state, (unsigned char *)line, (int)strlen(line));
+  _cupsMD5Finish(&state, sum);
 
   return (httpMD5String(sum, md5));
 }
@@ -144,8 +126,3 @@ httpMD5String(const unsigned char *sum,     /* I - MD5 sum data */
 
   return (md5);
 }
-
-
-/*
- * End of "$Id: md5passwd.c 4828 2005-11-11 12:53:38Z mike $".
- */