2 * This code is derived from (original license follows):
4 * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
5 * MD5 Message-Digest Algorithm (RFC 1321).
8 * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
11 * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
13 * This software was written by Alexander Peslyak in 2001. No copyright is
14 * claimed, and the software is hereby placed in the public domain.
15 * In case this attempt to disclaim copyright and place the software in the
16 * public domain is deemed null and void, then the software is
17 * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
18 * general public under the following terms:
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted.
23 * There's ABSOLUTELY NO WARRANTY, express or implied.
25 * See md5.c for more information.
28 #ifndef LLVM_SYSTEM_MD5_H
29 #define LLVM_SYSTEM_MD5_H
31 #include "llvm/Support/DataTypes.h"
36 // Any 32-bit or wider unsigned integer data type will do.
37 typedef uint32_t MD5_u32plus;
39 MD5_u32plus a, b, c, d;
41 unsigned char buffer[64];
42 MD5_u32plus block[16];
47 /// \brief Updates the hash for arguments provided.
48 void Update(void *data, unsigned long size);
50 /// \brief Finishes off the hash and puts the result in result.
51 void Final(unsigned char *result);
54 void *body(void *data, unsigned long size);