php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_hash_md.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 | Original Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
14 | Modified for pHASH by: Sara Golemon <pollita@php.net>
15 +----------------------------------------------------------------------+
16*/
17
18#ifndef PHP_HASH_MD_H
19#define PHP_HASH_MD_H
20
21#include "ext/standard/md5.h"
22
23/* MD4 context */
24typedef struct {
25 uint32_t state[4];
26 uint32_t count[2];
27 unsigned char buffer[64];
29#define PHP_MD4_SPEC "l4l2b64."
30
31#define PHP_MD4Init(ctx) PHP_MD4InitArgs(ctx, NULL)
33PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX *context, const unsigned char *, size_t);
34PHP_HASH_API void PHP_MD4Final(unsigned char[16], PHP_MD4_CTX *);
35
36/* MD2 context */
37typedef struct {
38 unsigned char state[48];
39 unsigned char checksum[16];
40 unsigned char buffer[16];
41 unsigned char in_buffer;
43#define PHP_MD2_SPEC "b48b16b16b."
44
45#define PHP_MD2Init(ctx) PHP_MD2InitArgs(ctx, NULL)
47PHP_HASH_API void PHP_MD2Update(PHP_MD2_CTX *context, const unsigned char *, size_t);
48PHP_HASH_API void PHP_MD2Final(unsigned char[16], PHP_MD2_CTX *);
49
50#endif
#define PHP_HASH_API
Definition php_hash.h:144
PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX *context, const unsigned char *, size_t)
Definition hash_md.c:205
PHP_HASH_API void PHP_MD2InitArgs(PHP_MD2_CTX *context, ZEND_ATTRIBUTE_UNUSED HashTable *args)
Definition hash_md.c:291
PHP_HASH_API void PHP_MD4Final(unsigned char[16], PHP_MD4_CTX *)
Definition hash_md.c:245
PHP_HASH_API void PHP_MD2Update(PHP_MD2_CTX *context, const unsigned char *, size_t)
Definition hash_md.c:319
PHP_HASH_API void PHP_MD2Final(unsigned char[16], PHP_MD2_CTX *)
Definition hash_md.c:350
PHP_HASH_API void PHP_MD4InitArgs(PHP_MD4_CTX *, ZEND_ATTRIBUTE_UNUSED HashTable *)
Definition hash_md.c:188
unsigned char checksum[16]
Definition php_hash_md.h:39
unsigned char buffer[16]
Definition php_hash_md.h:40
unsigned char state[48]
Definition php_hash_md.h:38
unsigned char in_buffer
Definition php_hash_md.h:41
uint32_t count[2]
Definition php_hash_md.h:26
uint32_t state[4]
Definition php_hash_md.h:25
unsigned char buffer[64]
Definition php_hash_md.h:27
Definition dce.c:49
zval * args
#define ZEND_ATTRIBUTE_UNUSED
struct _zend_array HashTable
Definition zend_types.h:386