1/* 2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23/* 24 *********************************************************************** 25 ** md5.h -- header file for implementation of MD5 ** 26 ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** 27 ** Created: 2/17/90 RLR ** 28 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** 29 ** Revised (for MD5): RLR 4/27/91 ** 30 ** -- G modified to have y&~z instead of y&z ** 31 ** -- FF, GG, HH modified to add in last register done ** 32 ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** 33 ** -- distinct additive constant for each step ** 34 ** -- round 4 added, working mod 7 ** 35 *********************************************************************** 36 */ 37 38/* 39 *********************************************************************** 40 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** 41 ** ** 42 ** License to copy and use this software is granted provided that ** 43 ** it is identified as the "RSA Data Security, Inc. MD5 Message- ** 44 ** Digest Algorithm" in all material mentioning or referencing this ** 45 ** software or this function. ** 46 ** ** 47 ** License is also granted to make and use derivative works ** 48 ** provided that such works are identified as "derived from the RSA ** 49 ** Data Security, Inc. MD5 Message-Digest Algorithm" in all ** 50 ** material mentioning or referencing the derived work. ** 51 ** ** 52 ** RSA Data Security, Inc. makes no representations concerning ** 53 ** either the merchantability of this software or the suitability ** 54 ** of this software for any particular purpose. It is provided "as ** 55 ** is" without express or implied warranty of any kind. ** 56 ** ** 57 ** These notices must be retained in any copies of any part of this ** 58 ** documentation and/or software. ** 59 *********************************************************************** 60 */ 61 62#ifndef __MD5_INCLUDE__ 63 64/* typedef a 32-bit type */ 65#ifdef _LP64 66typedef unsigned int UINT4; 67typedef int INT4; 68#else 69typedef unsigned long UINT4; 70typedef long INT4; 71#endif 72#define _UINT4_T 73 74/* Data structure for MD5 (Message-Digest) computation */ 75typedef struct { 76 UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ 77 UINT4 buf[4]; /* scratch buffer */ 78 unsigned char in[64]; /* input buffer */ 79 unsigned char digest[16]; /* actual digest after MD5Final call */ 80} MD5_CTX; 81 82void MD5Init (); 83void MD5Update (); 84void MD5Final (); 85 86#define __MD5_INCLUDE__ 87#endif /* __MD5_INCLUDE__ */ 88