Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-26 07:50:31

0001 /*
0002  * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
0003  * MD5 Message-Digest Algorithm (RFC 1321).
0004  *
0005  * Homepage:
0006  * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
0007  *
0008  * Author:
0009  * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
0010  *
0011  * This software was written by Alexander Peslyak in 2001.  No copyright is
0012  * claimed, and the software is hereby placed in the public domain.
0013  * In case this attempt to disclaim copyright and place the software in the
0014  * public domain is deemed null and void, then the software is
0015  * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
0016  * general public under the following terms:
0017  *
0018  * Redistribution and use in source and binary forms, with or without
0019  * modification, are permitted.
0020  *
0021  * There's ABSOLUTELY NO WARRANTY, express or implied.
0022  *
0023  * See md5.c for more information.
0024  */
0025 
0026 #if defined(HAVE_OPENSSL) || defined(OPENSSL_MD5_H) || defined(HEADER_MD5_H)
0027 #include <openssl/md5.h>
0028 #elif !defined(_MD5_H)
0029 #define _MD5_H
0030 
0031 /* Any 32-bit or wider unsigned integer data type will do */
0032 typedef unsigned int MD5_u32plus;
0033 
0034 typedef struct {
0035     MD5_u32plus lo, hi;
0036     MD5_u32plus a, b, c, d;
0037     unsigned char buffer[64];
0038     MD5_u32plus block[16];
0039 } MD5_CTX;
0040 
0041 extern void MD5_Init(MD5_CTX *ctx);
0042 extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
0043 extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
0044 
0045 #endif