Back to index

php5  5.3.10
md5.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Alexander Peslyak (Solar Designer) <solar at openwall.com>   |
00016    |         Rasmus Lerdorf <rasmus@lerdorf.on.ca>                        |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: md5.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef MD5_H
00023 #define MD5_H
00024 
00025 PHPAPI void make_digest(char *md5str, const unsigned char *digest);
00026 PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len);
00027 
00028 PHP_NAMED_FUNCTION(php_if_md5);
00029 PHP_NAMED_FUNCTION(php_if_md5_file);
00030 
00031 #include "ext/standard/basic_functions.h"
00032 
00033 /*
00034  * This is an OpenSSL-compatible implementation of the RSA Data Security,
00035  * Inc. MD5 Message-Digest Algorithm (RFC 1321).
00036  *
00037  * Written by Solar Designer <solar at openwall.com> in 2001, and placed
00038  * in the public domain.  There's absolutely no warranty.
00039  *
00040  * See md5.c for more information.
00041  */
00042 
00043 /* MD5 context. */
00044 typedef struct {
00045        php_uint32 lo, hi;
00046        php_uint32 a, b, c, d;
00047        unsigned char buffer[64];
00048        php_uint32 block[16];
00049 } PHP_MD5_CTX;
00050 
00051 PHPAPI void PHP_MD5Init(PHP_MD5_CTX *ctx);
00052 PHPAPI void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size);
00053 PHPAPI void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx);
00054 
00055 #endif