php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
md5.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Alexander Peslyak (Solar Designer) <solar at openwall.com> |
14 | Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
15 +----------------------------------------------------------------------+
16*/
17
18#ifndef MD5_H
19#define MD5_H
20
21PHPAPI void make_digest(char *md5str, const unsigned char *digest);
22PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len);
23
24/*
25 * This is an OpenSSL-compatible implementation of the RSA Data Security,
26 * Inc. MD5 Message-Digest Algorithm (RFC 1321).
27 *
28 * Written by Solar Designer <solar at openwall.com> in 2001, and placed
29 * in the public domain. There's absolutely no warranty.
30 *
31 * See md5.c for more information.
32 */
33
34/* MD5 context. */
35typedef struct {
36 uint32_t lo, hi;
37 uint32_t a, b, c, d;
38 unsigned char buffer[64];
39 uint32_t block[16];
41#define PHP_MD5_SPEC "llllllb64l16."
42
43#define PHP_MD5Init(ctx) PHP_MD5InitArgs(ctx, NULL)
45PHPAPI void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size);
46PHPAPI void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx);
47
48#endif
size_t len
Definition apprentice.c:174
new_type size
Definition ffi.c:4365
PHPAPI void make_digest(char *md5str, const unsigned char *digest)
Definition md5.c:22
PHPAPI void PHP_MD5InitArgs(PHP_MD5_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args)
Definition md5.c:293
PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len)
Definition md5.c:28
PHPAPI void PHP_MD5Final(unsigned char *result, PHP_MD5_CTX *ctx)
Definition md5.c:339
PHPAPI void PHP_MD5Update(PHP_MD5_CTX *ctx, const void *data, size_t size)
Definition md5.c:304
#define PHPAPI
Definition php.h:71
zend_constant * data
uint32_t d
Definition md5.h:37
uint32_t block[16]
Definition md5.h:39
uint32_t b
Definition md5.h:37
uint32_t hi
Definition md5.h:36
unsigned char buffer[64]
Definition md5.h:38
uint32_t lo
Definition md5.h:36
uint32_t c
Definition md5.h:37
uint32_t a
Definition md5.h:37
Definition dce.c:49
zval * args
#define ZEND_ATTRIBUTE_UNUSED
struct _zend_array HashTable
Definition zend_types.h:386
bool result