diff options
| author | Stefan Esser | 2015-12-17 16:35:34 +0100 |
|---|---|---|
| committer | Stefan Esser | 2015-12-17 16:35:34 +0100 |
| commit | c4c9192839ba7842f5da58f5fd525056c77cfe54 (patch) | |
| tree | 810854ddb53e03d7320570ec8d634390a849d6b2 /sha256.h | |
| parent | aee7faf18880573b60606756a61faea32a1bb89a (diff) | |
Continue the actual porting work on GitHub
Diffstat (limited to 'sha256.h')
| -rw-r--r-- | sha256.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sha256.h b/sha256.h new file mode 100644 index 0000000..d728506 --- /dev/null +++ b/sha256.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* | ||
| 2 | +----------------------------------------------------------------------+ | ||
| 3 | | Suhosin Version 1 | | ||
| 4 | +----------------------------------------------------------------------+ | ||
| 5 | | Copyright (c) 2006-2007 The Hardened-PHP Project | | ||
| 6 | | Copyright (c) 2007-2015 SektionEins GmbH | | ||
| 7 | +----------------------------------------------------------------------+ | ||
| 8 | | This source file is subject to version 3.01 of the PHP license, | | ||
| 9 | | that is bundled with this package in the file LICENSE, and is | | ||
| 10 | | available through the world-wide-web at the following url: | | ||
| 11 | | http://www.php.net/license/3_01.txt | | ||
| 12 | | If you did not receive a copy of the PHP license and are unable to | | ||
| 13 | | obtain it through the world-wide-web, please send a note to | | ||
| 14 | | license@php.net so we can mail you a copy immediately. | | ||
| 15 | +----------------------------------------------------------------------+ | ||
| 16 | | Author: Stefan Esser <sesser@sektioneins.de> | | ||
| 17 | +----------------------------------------------------------------------+ | ||
| 18 | */ | ||
| 19 | |||
| 20 | /* $Id: sha256.h $ */ | ||
| 21 | |||
| 22 | #ifndef SHA256_H | ||
| 23 | #define SHA256_H | ||
| 24 | |||
| 25 | #include "ext/standard/basic_functions.h" | ||
| 26 | |||
| 27 | /* SHA1 context. */ | ||
| 28 | typedef struct { | ||
| 29 | php_uint32 state[8]; /* state (ABCD) */ | ||
| 30 | php_uint32 count[2]; /* number of bits, modulo 2^64 (lsb first) */ | ||
| 31 | unsigned char buffer[64]; /* input buffer */ | ||
| 32 | } suhosin_SHA256_CTX; | ||
| 33 | |||
| 34 | void suhosin_SHA256Init(suhosin_SHA256_CTX *); | ||
| 35 | void suhosin_SHA256Update(suhosin_SHA256_CTX *, const unsigned char *, unsigned int); | ||
| 36 | void suhosin_SHA256Final(unsigned char[32], suhosin_SHA256_CTX *); | ||
| 37 | |||
| 38 | #endif | ||
