source: src/router/php7/ext/hash/php_hash_sha3.h @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 2.4 KB
Line 
1/*
2   +----------------------------------------------------------------------+
3   | PHP Version 7                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2017 The PHP Group                                |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 3.01 of the PHP license,      |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available through the world-wide-web at the following url:           |
10   | http://www.php.net/license/3_01.txt                                  |
11   | If you did not receive a copy of the PHP license and are unable to   |
12   | obtain it through the world-wide-web, please send a note to          |
13   | license@php.net so we can mail you a copy immediately.               |
14   +----------------------------------------------------------------------+
15   | Author: Sara Golemon <pollita@php.net>                               |
16   +----------------------------------------------------------------------+
17*/
18
19#ifndef PHP_HASH_SHA3_H
20#define PHP_HASH_SHA3_H
21
22#include "php.h"
23
24typedef struct {
25        unsigned char state[200]; // 5 * 5 * sizeof(uint64)
26        uint32_t pos;
27} PHP_SHA3_CTX;
28
29typedef PHP_SHA3_CTX PHP_SHA3_224_CTX;
30typedef PHP_SHA3_CTX PHP_SHA3_256_CTX;
31typedef PHP_SHA3_CTX PHP_SHA3_384_CTX;
32typedef PHP_SHA3_CTX PHP_SHA3_512_CTX;
33
34PHP_HASH_API void PHP_SHA3224Init(PHP_SHA3_224_CTX*);
35PHP_HASH_API void PHP_SHA3224Update(PHP_SHA3_224_CTX*, const unsigned char*, unsigned int);
36PHP_HASH_API void PHP_SAH3224Final(unsigned char[32], PHP_SHA3_224_CTX*);
37
38PHP_HASH_API void PHP_SHA3256Init(PHP_SHA3_256_CTX*);
39PHP_HASH_API void PHP_SHA3256Update(PHP_SHA3_256_CTX*, const unsigned char*, unsigned int);
40PHP_HASH_API void PHP_SAH3256Final(unsigned char[32], PHP_SHA3_256_CTX*);
41
42PHP_HASH_API void PHP_SHA3384Init(PHP_SHA3_384_CTX*);
43PHP_HASH_API void PHP_SHA3384Update(PHP_SHA3_384_CTX*, const unsigned char*, unsigned int);
44PHP_HASH_API void PHP_SAH3384Final(unsigned char[32], PHP_SHA3_384_CTX*);
45
46PHP_HASH_API void PHP_SHA3512Init(PHP_SHA3_512_CTX*);
47PHP_HASH_API void PHP_SHA3512Update(PHP_SHA3_512_CTX*, const unsigned char*, unsigned int);
48PHP_HASH_API void PHP_SAH3512Final(unsigned char[32], PHP_SHA3_512_CTX*);
49
50#endif
51/*
52 * Local variables:
53 * tab-width: 4
54 * c-basic-offset: 4
55 * End:
56 * vim600: sw=4 ts=4 fdm=marker
57 * vim<600: sw=4 ts=4
58 */
Note: See TracBrowser for help on using the repository browser.