Blame src/base/md5.h

Packit cf904d
/*
Packit cf904d
 * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
Packit cf904d
 * MD5 Message-Digest Algorithm (RFC 1321).
Packit cf904d
 *
Packit cf904d
 * Homepage:
Packit cf904d
 * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
Packit cf904d
 *
Packit cf904d
 * Author:
Packit cf904d
 * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
Packit cf904d
 *
Packit cf904d
 * This software was written by Alexander Peslyak in 2001.  No copyright is
Packit cf904d
 * claimed, and the software is hereby placed in the public domain.
Packit cf904d
 * In case this attempt to disclaim copyright and place the software in the
Packit cf904d
 * public domain is deemed null and void, then the software is
Packit cf904d
 * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
Packit cf904d
 * general public under the following terms:
Packit cf904d
 *
Packit cf904d
 * Redistribution and use in source and binary forms, with or without
Packit cf904d
 * modification, are permitted.
Packit cf904d
 *
Packit cf904d
 * There's ABSOLUTELY NO WARRANTY, express or implied.
Packit cf904d
 *
Packit cf904d
 * See md5.c for more information.
Packit cf904d
 */
Packit cf904d
Packit cf904d
#ifdef HAVE_OPENSSL
Packit cf904d
#include <openssl/md5.h>
Packit cf904d
#elif !defined(_MD5_H)
Packit cf904d
#define _MD5_H
Packit cf904d
Packit cf904d
/* Any 32-bit or wider unsigned integer data type will do */
Packit cf904d
typedef unsigned int MD5_u32plus;
Packit cf904d
Packit cf904d
typedef struct {
Packit cf904d
	MD5_u32plus lo, hi;
Packit cf904d
	MD5_u32plus a, b, c, d;
Packit cf904d
	unsigned char buffer[64];
Packit cf904d
	MD5_u32plus block[16];
Packit cf904d
} MD5_CTX;
Packit cf904d
Packit cf904d
extern void MD5_Init(MD5_CTX *ctx);
Packit cf904d
extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
Packit cf904d
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
Packit cf904d
Packit cf904d
#endif