home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Web / Servers / apache-1.2.4-MIHS / original-source / src / md5.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-01  |  4.2 KB  |  100 lines

  1. /*
  2.  * This is work is derived from material Copyright RSA Data Security, Inc.
  3.  *
  4.  * The RSA copyright statement and Licence for that original material is
  5.  * included below. This is followed by the Apache copyright statement and
  6.  * licence for the modifications made to that material.
  7.  */
  8.  
  9. /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  10. rights reserved.
  11.  
  12. License to copy and use this software is granted provided that it
  13. is identified as the "RSA Data Security, Inc. MD5 Message-Digest
  14. Algorithm" in all material mentioning or referencing this software
  15. or this function.
  16.  
  17. License is also granted to make and use derivative works provided
  18. that such works are identified as "derived from the RSA Data
  19. Security, Inc. MD5 Message-Digest Algorithm" in all material
  20. mentioning or referencing the derived work.
  21.  
  22. RSA Data Security, Inc. makes no representations concerning either
  23. the merchantability of this software or the suitability of this
  24. software for any particular purpose. It is provided "as is"
  25. without express or implied warranty of any kind.
  26.  
  27. These notices must be retained in any copies of any part of this
  28. documentation and/or software.
  29.  */
  30.  
  31. /* ====================================================================
  32.  * Copyright (c) 1996,1997 The Apache Group.  All rights reserved.
  33.  *
  34.  * Redistribution and use in source and binary forms, with or without
  35.  * modification, are permitted provided that the following conditions
  36.  * are met:
  37.  *
  38.  * 1. Redistributions of source code must retain the above copyright
  39.  *    notice, this list of conditions and the following disclaimer. 
  40.  *
  41.  * 2. Redistributions in binary form must reproduce the above copyright
  42.  *    notice, this list of conditions and the following disclaimer in
  43.  *    the documentation and/or other materials provided with the
  44.  *    distribution.
  45.  *
  46.  * 3. All advertising materials mentioning features or use of this
  47.  *    software must display the following acknowledgment:
  48.  *    "This product includes software developed by the Apache Group
  49.  *    for use in the Apache HTTP server project (http://www.apache.org/)."
  50.  *
  51.  * 4. The names "Apache Server" and "Apache Group" must not be used to
  52.  *    endorse or promote products derived from this software without
  53.  *    prior written permission.
  54.  *
  55.  * 5. Redistributions of any form whatsoever must retain the following
  56.  *    acknowledgment:
  57.  *    "This product includes software developed by the Apache Group
  58.  *    for use in the Apache HTTP server project (http://www.apache.org/)."
  59.  *
  60.  * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
  61.  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  62.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  63.  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
  64.  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  65.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  66.  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  67.  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  68.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  69.  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  70.  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  71.  * OF THE POSSIBILITY OF SUCH DAMAGE.
  72.  * ====================================================================
  73.  *
  74.  * This software consists of voluntary contributions made by many
  75.  * individuals on behalf of the Apache Group and was originally based
  76.  * on public domain software written at the National Center for
  77.  * Supercomputing Applications, University of Illinois, Urbana-Champaign.
  78.  * For more information on the Apache Group and the Apache HTTP server
  79.  * project, please see <http://www.apache.org/>.
  80.  *
  81.  */
  82.  
  83.  
  84. /* MD5.H - header file for MD5C.C */
  85.  
  86. /* UINT4 defines a four byte word */
  87. typedef unsigned int UINT4;
  88.  
  89. /* MD5 context. */
  90. typedef struct {
  91.   UINT4 state[4];                                   /* state (ABCD) */
  92.   UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
  93.   unsigned char buffer[64];                         /* input buffer */
  94. } MD5_CTX;
  95.  
  96. extern void MD5Init(MD5_CTX *context);
  97. extern void MD5Update(MD5_CTX *context, const unsigned char *input,
  98.               unsigned int inputLen);
  99. extern void MD5Final(unsigned char digest[16], MD5_CTX *context);
  100.