00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Luke Moore 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: UT_MD5.h 00015 * 00016 * COMMENTS: 00017 * Modified by Side Effects Software Inc. to add an easy-to-use 00018 * interface, to port to 64-bit platforms, and to add base-64 output. 00019 * 00020 * See RFC 1321 for information on how the algorithm works. 00021 */ 00022 00023 /* 00024 ********************************************************************** 00025 ** RSA Data Security, Inc. MD5 Message Digest Algorithm ** 00026 ** Created: 2/17/90 RLR ** 00027 ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** 00028 ** Revised (for MD5): RLR 4/27/91 ** 00029 ** -- G modified to have y&~z instead of y&z ** 00030 ** -- FF, GG, HH modified to add in last register done ** 00031 ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** 00032 ** -- distinct additive constant for each step ** 00033 ** -- round 4 added, working mod 7 ** 00034 ********************************************************************** 00035 */ 00036 00037 /* 00038 ********************************************************************** 00039 ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. ** 00040 ** ** 00041 ** License to copy and use this software is granted provided that ** 00042 ** it is identified as the "RSA Data Security, Inc. MD5 Message ** 00043 ** Digest Algorithm" in all material mentioning or referencing this ** 00044 ** software or this function. ** 00045 ** ** 00046 ** License is also granted to make and use derivative works ** 00047 ** provided that such works are identified as "derived from the RSA ** 00048 ** Data Security, Inc. MD5 Message Digest Algorithm" in all ** 00049 ** material mentioning or referencing the derived work. ** 00050 ** ** 00051 ** RSA Data Security, Inc. makes no representations concerning ** 00052 ** either the merchantability of this software or the suitability ** 00053 ** of this software for any particular purpose. It is provided "as ** 00054 ** is" without express or implied warranty of any kind. ** 00055 ** ** 00056 ** These notices must be retained in any copies of any part of this ** 00057 ** documentation and/or software. ** 00058 ********************************************************************** 00059 */ 00060 00061 #ifndef __UT_MD5_h__ 00062 #define __UT_MD5_h__ 00063 00064 #include "UT_API.h" 00065 class UT_WorkBuffer; 00066 00067 // Return a 32-character null-terminated base-16 string representing the 00068 // 128-bit message digest of the given string. 00069 UT_API extern void UT_md5(const char *input, char result[33]); 00070 UT_API extern void UT_md5(const char *input, UT_WorkBuffer &result); 00071 00072 // The version returns a 22-character base-64 string of the message digest. 00073 UT_API extern void UT_md5_base64(const char *input, char result[23]); 00074 UT_API extern void UT_md5_base64(const char *input, UT_WorkBuffer &result); 00075 00076 #endif
1.5.9