openModeller
Version 1.4.0
|
00001 /* 00002 * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. 00003 * MD5 Message-Digest Algorithm (RFC 1321). 00004 * 00005 * Homepage: 00006 * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 00007 * 00008 * Author: 00009 * Alexander Peslyak, better known as Solar Designer <solar at openwall.com> 00010 * 00011 * This software was written by Alexander Peslyak in 2001. No copyright is 00012 * claimed, and the software is hereby placed in the public domain. 00013 * In case this attempt to disclaim copyright and place the software in the 00014 * public domain is deemed null and void, then the software is 00015 * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the 00016 * general public under the following terms: 00017 * 00018 * Redistribution and use in source and binary forms, with or without 00019 * modification, are permitted. 00020 * 00021 * There's ABSOLUTELY NO WARRANTY, express or implied. 00022 * 00023 * See md5.c for more information. 00024 */ 00025 00026 #ifdef HAVE_OPENSSL 00027 #include <openssl/md5.h> 00028 #elif !defined(_MD5_H) 00029 #define _MD5_H 00030 00031 /* Any 32-bit or wider unsigned integer data type will do */ 00032 typedef unsigned int MD5_u32plus; 00033 00034 typedef struct { 00035 MD5_u32plus lo, hi; 00036 MD5_u32plus a, b, c, d; 00037 unsigned char buffer[64]; 00038 MD5_u32plus block[16]; 00039 } MD5_CTX; 00040 00041 extern void MD5_Init(MD5_CTX *ctx); 00042 extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size); 00043 extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); 00044 00045 #endif 00046