Файловый менеджер - Редактировать - /home/skymarketplace/public_html/uploads/hash.zip
Назад
PK 2��Z�/ZS� � php_hash.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_H #define PHP_HASH_H #include "php.h" #define PHP_HASH_EXTNAME "hash" #define PHP_HASH_VERSION PHP_VERSION #define PHP_MHASH_VERSION PHP_VERSION #define PHP_HASH_HMAC 0x0001 #define PHP_HASH_SERIALIZE_MAGIC_SPEC 2 #define L64 INT64_C typedef struct _php_hashcontext_object php_hashcontext_object; typedef void (*php_hash_init_func_t)(void *context); typedef void (*php_hash_update_func_t)(void *context, const unsigned char *buf, size_t count); typedef void (*php_hash_final_func_t)(unsigned char *digest, void *context); typedef int (*php_hash_copy_func_t)(const void *ops, void *orig_context, void *dest_context); typedef int (*php_hash_serialize_func_t)(const php_hashcontext_object *hash, zend_long *magic, zval *zv); typedef int (*php_hash_unserialize_func_t)(php_hashcontext_object *hash, zend_long magic, const zval *zv); typedef struct _php_hash_ops { const char *algo; php_hash_init_func_t hash_init; php_hash_update_func_t hash_update; php_hash_final_func_t hash_final; php_hash_copy_func_t hash_copy; php_hash_serialize_func_t hash_serialize; php_hash_unserialize_func_t hash_unserialize; const char *serialize_spec; size_t digest_size; size_t block_size; size_t context_size; unsigned is_crypto: 1; } php_hash_ops; struct _php_hashcontext_object { const php_hash_ops *ops; void *context; zend_long options; unsigned char *key; zend_object std; }; static inline php_hashcontext_object *php_hashcontext_from_object(zend_object *obj) { return ((php_hashcontext_object*)(obj + 1)) - 1; } extern const php_hash_ops php_hash_md2_ops; extern const php_hash_ops php_hash_md4_ops; extern const php_hash_ops php_hash_md5_ops; extern const php_hash_ops php_hash_sha1_ops; extern const php_hash_ops php_hash_sha224_ops; extern const php_hash_ops php_hash_sha256_ops; extern const php_hash_ops php_hash_sha384_ops; extern const php_hash_ops php_hash_sha512_ops; extern const php_hash_ops php_hash_sha512_256_ops; extern const php_hash_ops php_hash_sha512_224_ops; extern const php_hash_ops php_hash_sha3_224_ops; extern const php_hash_ops php_hash_sha3_256_ops; extern const php_hash_ops php_hash_sha3_384_ops; extern const php_hash_ops php_hash_sha3_512_ops; extern const php_hash_ops php_hash_ripemd128_ops; extern const php_hash_ops php_hash_ripemd160_ops; extern const php_hash_ops php_hash_ripemd256_ops; extern const php_hash_ops php_hash_ripemd320_ops; extern const php_hash_ops php_hash_whirlpool_ops; extern const php_hash_ops php_hash_3tiger128_ops; extern const php_hash_ops php_hash_3tiger160_ops; extern const php_hash_ops php_hash_3tiger192_ops; extern const php_hash_ops php_hash_4tiger128_ops; extern const php_hash_ops php_hash_4tiger160_ops; extern const php_hash_ops php_hash_4tiger192_ops; extern const php_hash_ops php_hash_snefru_ops; extern const php_hash_ops php_hash_gost_ops; extern const php_hash_ops php_hash_gost_crypto_ops; extern const php_hash_ops php_hash_adler32_ops; extern const php_hash_ops php_hash_crc32_ops; extern const php_hash_ops php_hash_crc32b_ops; extern const php_hash_ops php_hash_crc32c_ops; extern const php_hash_ops php_hash_fnv132_ops; extern const php_hash_ops php_hash_fnv1a32_ops; extern const php_hash_ops php_hash_fnv164_ops; extern const php_hash_ops php_hash_fnv1a64_ops; extern const php_hash_ops php_hash_joaat_ops; #define PHP_HASH_HAVAL_OPS(p,b) extern const php_hash_ops php_hash_##p##haval##b##_ops; PHP_HASH_HAVAL_OPS(3,128) PHP_HASH_HAVAL_OPS(3,160) PHP_HASH_HAVAL_OPS(3,192) PHP_HASH_HAVAL_OPS(3,224) PHP_HASH_HAVAL_OPS(3,256) PHP_HASH_HAVAL_OPS(4,128) PHP_HASH_HAVAL_OPS(4,160) PHP_HASH_HAVAL_OPS(4,192) PHP_HASH_HAVAL_OPS(4,224) PHP_HASH_HAVAL_OPS(4,256) PHP_HASH_HAVAL_OPS(5,128) PHP_HASH_HAVAL_OPS(5,160) PHP_HASH_HAVAL_OPS(5,192) PHP_HASH_HAVAL_OPS(5,224) PHP_HASH_HAVAL_OPS(5,256) extern zend_module_entry hash_module_entry; #define phpext_hash_ptr &hash_module_entry #ifdef PHP_WIN32 # define PHP_HASH_API __declspec(dllexport) #elif defined(__GNUC__) && __GNUC__ >= 4 # define PHP_HASH_API __attribute__ ((visibility("default"))) #else # define PHP_HASH_API #endif extern PHP_HASH_API zend_class_entry *php_hashcontext_ce; PHP_HASH_API const php_hash_ops *php_hash_fetch_ops(zend_string *algo); PHP_HASH_API void php_hash_register_algo(const char *algo, const php_hash_ops *ops); PHP_HASH_API int php_hash_copy(const void *ops, void *orig_context, void *dest_context); PHP_HASH_API int php_hash_serialize(const php_hashcontext_object *context, zend_long *magic, zval *zv); PHP_HASH_API int php_hash_unserialize(php_hashcontext_object *context, zend_long magic, const zval *zv); PHP_HASH_API int php_hash_serialize_spec(const php_hashcontext_object *context, zval *zv, const char *spec); PHP_HASH_API int php_hash_unserialize_spec(php_hashcontext_object *hash, const zval *zv, const char *spec); static inline void *php_hash_alloc_context(const php_hash_ops *ops) { /* Zero out context memory so serialization doesn't expose internals */ return ecalloc(1, ops->context_size); } static inline void php_hash_bin2hex(char *out, const unsigned char *in, size_t in_len) { static const char hexits[17] = "0123456789abcdef"; size_t i; for(i = 0; i < in_len; i++) { out[i * 2] = hexits[in[i] >> 4]; out[(i * 2) + 1] = hexits[in[i] & 0x0F]; } } #endif /* PHP_HASH_H */ PK 2��Z��� php_hash_adler32.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Wallner <mike@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_ADLER32_H #define PHP_HASH_ADLER32_H #include "ext/standard/basic_functions.h" typedef struct { uint32_t state; } PHP_ADLER32_CTX; #define PHP_ADLER32_SPEC "l." PHP_HASH_API void PHP_ADLER32Init(PHP_ADLER32_CTX *context); PHP_HASH_API void PHP_ADLER32Update(PHP_ADLER32_CTX *context, const unsigned char *input, size_t len); PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context); PHP_HASH_API int PHP_ADLER32Copy(const php_hash_ops *ops, PHP_ADLER32_CTX *orig_context, PHP_ADLER32_CTX *copy_context); #endif PK 2��Z�=� php_hash_crc32.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Wallner <mike@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_CRC32_H #define PHP_HASH_CRC32_H #include "ext/standard/basic_functions.h" typedef struct { uint32_t state; } PHP_CRC32_CTX; #define PHP_CRC32_SPEC "l." PHP_HASH_API void PHP_CRC32Init(PHP_CRC32_CTX *context); PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); PHP_HASH_API void PHP_CRC32CUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len); PHP_HASH_API void PHP_CRC32LEFinal(unsigned char digest[4], PHP_CRC32_CTX *context); PHP_HASH_API void PHP_CRC32BEFinal(unsigned char digest[4], PHP_CRC32_CTX *context); PHP_HASH_API int PHP_CRC32Copy(const php_hash_ops *ops, PHP_CRC32_CTX *orig_context, PHP_CRC32_CTX *copy_context); #endif PK 2��Z�IAO� � php_hash_fnv.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Maclean <mgdm@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_FNV_H #define PHP_HASH_FNV_H #define PHP_FNV1_32_INIT ((uint32_t)0x811c9dc5) #define PHP_FNV1_32A_INIT PHP_FNV1_32_INIT #define PHP_FNV_32_PRIME ((uint32_t)0x01000193) #define PHP_FNV1_64_INIT ((uint64_t)0xcbf29ce484222325ULL) #define PHP_FNV1A_64_INIT FNV1_64_INIT #define PHP_FNV_64_PRIME ((uint64_t)0x100000001b3ULL) /* * hash types */ enum php_fnv_type { PHP_FNV_NONE = 0, /* invalid FNV hash type */ PHP_FNV0_32 = 1, /* FNV-0 32 bit hash */ PHP_FNV1_32 = 2, /* FNV-1 32 bit hash */ PHP_FNV1a_32 = 3, /* FNV-1a 32 bit hash */ PHP_FNV0_64 = 4, /* FNV-0 64 bit hash */ PHP_FNV1_64 = 5, /* FNV-1 64 bit hash */ PHP_FNV1a_64 = 6, /* FNV-1a 64 bit hash */ }; typedef struct { uint32_t state; } PHP_FNV132_CTX; #define PHP_FNV132_SPEC "l." typedef struct { uint64_t state; } PHP_FNV164_CTX; #define PHP_FNV164_SPEC "q." PHP_HASH_API void PHP_FNV132Init(PHP_FNV132_CTX *context); PHP_HASH_API void PHP_FNV132Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inputLen); PHP_HASH_API void PHP_FNV1a32Update(PHP_FNV132_CTX *context, const unsigned char *input, size_t inputLen); PHP_HASH_API void PHP_FNV132Final(unsigned char digest[16], PHP_FNV132_CTX * context); PHP_HASH_API void PHP_FNV164Init(PHP_FNV164_CTX *context); PHP_HASH_API void PHP_FNV164Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inputLen); PHP_HASH_API void PHP_FNV1a64Update(PHP_FNV164_CTX *context, const unsigned char *input, size_t inputLen); PHP_HASH_API void PHP_FNV164Final(unsigned char digest[16], PHP_FNV164_CTX * context); static uint32_t fnv_32_buf(void *buf, size_t len, uint32_t hval, int alternate); static uint64_t fnv_64_buf(void *buf, size_t len, uint64_t hval, int alternate); #endif PK 2��Z|���� � php_hash_gost.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Wallner <mike@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_GOST_H #define PHP_HASH_GOST_H #include "ext/standard/basic_functions.h" /* GOST context */ typedef struct { uint32_t state[16]; uint32_t count[2]; unsigned char length; unsigned char buffer[32]; const uint32_t (*tables)[4][256]; } PHP_GOST_CTX; #define PHP_GOST_SPEC "l16l2bb32" PHP_HASH_API void PHP_GOSTInit(PHP_GOST_CTX *); PHP_HASH_API void PHP_GOSTUpdate(PHP_GOST_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_GOSTFinal(unsigned char[64], PHP_GOST_CTX *); #endif PK 2��Z�Ugp8 8 php_hash_haval.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_HAVAL_H #define PHP_HASH_HAVAL_H #include "ext/standard/basic_functions.h" /* HAVAL context. */ typedef struct { uint32_t state[8]; uint32_t count[2]; unsigned char buffer[128]; char passes; short output; void (*Transform)(uint32_t state[8], const unsigned char block[128]); } PHP_HAVAL_CTX; #define PHP_HAVAL_SPEC "l8l2b128" #define PHP_HASH_HAVAL_INIT_DECL(p,b) PHP_HASH_API void PHP_##p##HAVAL##b##Init(PHP_HAVAL_CTX *); \ PHP_HASH_API void PHP_HAVAL##b##Final(unsigned char*, PHP_HAVAL_CTX *); PHP_HASH_API void PHP_HAVALUpdate(PHP_HAVAL_CTX *, const unsigned char *, size_t); PHP_HASH_HAVAL_INIT_DECL(3,128) PHP_HASH_HAVAL_INIT_DECL(3,160) PHP_HASH_HAVAL_INIT_DECL(3,192) PHP_HASH_HAVAL_INIT_DECL(3,224) PHP_HASH_HAVAL_INIT_DECL(3,256) PHP_HASH_HAVAL_INIT_DECL(4,128) PHP_HASH_HAVAL_INIT_DECL(4,160) PHP_HASH_HAVAL_INIT_DECL(4,192) PHP_HASH_HAVAL_INIT_DECL(4,224) PHP_HASH_HAVAL_INIT_DECL(4,256) PHP_HASH_HAVAL_INIT_DECL(5,128) PHP_HASH_HAVAL_INIT_DECL(5,160) PHP_HASH_HAVAL_INIT_DECL(5,192) PHP_HASH_HAVAL_INIT_DECL(5,224) PHP_HASH_HAVAL_INIT_DECL(5,256) #endif PK 2��Z�~o� � php_hash_joaat.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Martin Jansen <mj@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_JOAAT_H #define PHP_HASH_JOAAT_H typedef struct { uint32_t state; } PHP_JOAAT_CTX; #define PHP_JOAAT_SPEC "l." PHP_HASH_API void PHP_JOAATInit(PHP_JOAAT_CTX *context); PHP_HASH_API void PHP_JOAATUpdate(PHP_JOAAT_CTX *context, const unsigned char *input, size_t inputLen); PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[16], PHP_JOAAT_CTX * context); static uint32_t joaat_buf(void *buf, size_t len, uint32_t hval); #endif PK 2��Z.�H�^ ^ php_hash_md.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Original Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | | Modified for pHASH by: Sara Golemon <pollita@php.net> +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_MD_H #define PHP_HASH_MD_H #include "ext/standard/md5.h" /* MD4 context */ typedef struct { uint32_t state[4]; uint32_t count[2]; unsigned char buffer[64]; } PHP_MD4_CTX; #define PHP_MD4_SPEC "l4l2b64." PHP_HASH_API void PHP_MD4Init(PHP_MD4_CTX *); PHP_HASH_API void PHP_MD4Update(PHP_MD4_CTX *context, const unsigned char *, size_t); PHP_HASH_API void PHP_MD4Final(unsigned char[16], PHP_MD4_CTX *); /* MD2 context */ typedef struct { unsigned char state[48]; unsigned char checksum[16]; unsigned char buffer[16]; unsigned char in_buffer; } PHP_MD2_CTX; #define PHP_MD2_SPEC "b48b16b16b." PHP_HASH_API void PHP_MD2Init(PHP_MD2_CTX *context); PHP_HASH_API void PHP_MD2Update(PHP_MD2_CTX *context, const unsigned char *, size_t); PHP_HASH_API void PHP_MD2Final(unsigned char[16], PHP_MD2_CTX *); #endif PK 2��Z�F�� � php_hash_ripemd.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_RIPEMD_H #define PHP_HASH_RIPEMD_H #include "ext/standard/basic_functions.h" /* RIPEMD context. */ typedef struct { uint32_t state[4]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } PHP_RIPEMD128_CTX; #define PHP_RIPEMD128_SPEC "l4l2b64." typedef struct { uint32_t state[5]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } PHP_RIPEMD160_CTX; #define PHP_RIPEMD160_SPEC "l5l2b64." typedef struct { uint32_t state[8]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } PHP_RIPEMD256_CTX; #define PHP_RIPEMD256_SPEC "l8l2b64." typedef struct { uint32_t state[10]; /* state (ABCD) */ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ unsigned char buffer[64]; /* input buffer */ } PHP_RIPEMD320_CTX; #define PHP_RIPEMD320_SPEC "l10l2b64." PHP_HASH_API void PHP_RIPEMD128Init(PHP_RIPEMD128_CTX *); PHP_HASH_API void PHP_RIPEMD128Update(PHP_RIPEMD128_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_RIPEMD128Final(unsigned char[16], PHP_RIPEMD128_CTX *); PHP_HASH_API void PHP_RIPEMD160Init(PHP_RIPEMD160_CTX *); PHP_HASH_API void PHP_RIPEMD160Update(PHP_RIPEMD160_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_RIPEMD160Final(unsigned char[20], PHP_RIPEMD160_CTX *); PHP_HASH_API void PHP_RIPEMD256Init(PHP_RIPEMD256_CTX *); PHP_HASH_API void PHP_RIPEMD256Update(PHP_RIPEMD256_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_RIPEMD256Final(unsigned char[32], PHP_RIPEMD256_CTX *); PHP_HASH_API void PHP_RIPEMD320Init(PHP_RIPEMD320_CTX *); PHP_HASH_API void PHP_RIPEMD320Update(PHP_RIPEMD320_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_RIPEMD320Final(unsigned char[40], PHP_RIPEMD320_CTX *); #endif /* PHP_HASH_RIPEMD_H */ PK 2��Z^��� � php_hash_sha.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | SHA1 Author: Stefan Esser <sesser@php.net> | | SHA256 Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_SHA_H #define PHP_HASH_SHA_H #include "ext/standard/sha1.h" #include "ext/standard/basic_functions.h" /* SHA224 context. */ typedef struct { uint32_t state[8]; /* state */ uint32_t count[2]; /* number of bits, modulo 2^64 */ unsigned char buffer[64]; /* input buffer */ } PHP_SHA224_CTX; #define PHP_SHA224_SPEC "l8l2b64." PHP_HASH_API void PHP_SHA224Init(PHP_SHA224_CTX *); PHP_HASH_API void PHP_SHA224Update(PHP_SHA224_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_SHA224Final(unsigned char[28], PHP_SHA224_CTX *); /* SHA256 context. */ typedef struct { uint32_t state[8]; /* state */ uint32_t count[2]; /* number of bits, modulo 2^64 */ unsigned char buffer[64]; /* input buffer */ } PHP_SHA256_CTX; #define PHP_SHA256_SPEC "l8l2b64." PHP_HASH_API void PHP_SHA256Init(PHP_SHA256_CTX *); PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_SHA256Final(unsigned char[32], PHP_SHA256_CTX *); /* SHA384 context */ typedef struct { uint64_t state[8]; /* state */ uint64_t count[2]; /* number of bits, modulo 2^128 */ unsigned char buffer[128]; /* input buffer */ } PHP_SHA384_CTX; #define PHP_SHA384_SPEC "q8q2b128." PHP_HASH_API void PHP_SHA384Init(PHP_SHA384_CTX *); PHP_HASH_API void PHP_SHA384Update(PHP_SHA384_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_SHA384Final(unsigned char[48], PHP_SHA384_CTX *); /* SHA512 context */ typedef struct { uint64_t state[8]; /* state */ uint64_t count[2]; /* number of bits, modulo 2^128 */ unsigned char buffer[128]; /* input buffer */ } PHP_SHA512_CTX; #define PHP_SHA512_SPEC "q8q2b128." PHP_HASH_API void PHP_SHA512Init(PHP_SHA512_CTX *); PHP_HASH_API void PHP_SHA512Update(PHP_SHA512_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_SHA512Final(unsigned char[64], PHP_SHA512_CTX *); PHP_HASH_API void PHP_SHA512_256Init(PHP_SHA512_CTX *); #define PHP_SHA512_256Update PHP_SHA512Update PHP_HASH_API void PHP_SHA512_256Final(unsigned char[32], PHP_SHA512_CTX *); PHP_HASH_API void PHP_SHA512_224Init(PHP_SHA512_CTX *); #define PHP_SHA512_224Update PHP_SHA512Update PHP_HASH_API void PHP_SHA512_224Final(unsigned char[28], PHP_SHA512_CTX *); #endif /* PHP_HASH_SHA_H */ PK 2��Z��5�/ / php_hash_sha3.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_SHA3_H #define PHP_HASH_SHA3_H #include "php.h" typedef struct { #ifdef HAVE_SLOW_HASH3 unsigned char state[200]; // 5 * 5 * sizeof(uint64) uint32_t pos; #else unsigned char state[224]; // this must fit a Keccak_HashInstance #endif } PHP_SHA3_CTX; #ifdef HAVE_SLOW_HASH3 #define PHP_SHA3_SPEC "b200l." #endif typedef PHP_SHA3_CTX PHP_SHA3_224_CTX; typedef PHP_SHA3_CTX PHP_SHA3_256_CTX; typedef PHP_SHA3_CTX PHP_SHA3_384_CTX; typedef PHP_SHA3_CTX PHP_SHA3_512_CTX; PHP_HASH_API void PHP_SHA3224Init(PHP_SHA3_224_CTX*); PHP_HASH_API void PHP_SHA3224Update(PHP_SHA3_224_CTX*, const unsigned char*, size_t); PHP_HASH_API void PHP_SAH3224Final(unsigned char[32], PHP_SHA3_224_CTX*); PHP_HASH_API void PHP_SHA3256Init(PHP_SHA3_256_CTX*); PHP_HASH_API void PHP_SHA3256Update(PHP_SHA3_256_CTX*, const unsigned char*, size_t); PHP_HASH_API void PHP_SAH3256Final(unsigned char[32], PHP_SHA3_256_CTX*); PHP_HASH_API void PHP_SHA3384Init(PHP_SHA3_384_CTX*); PHP_HASH_API void PHP_SHA3384Update(PHP_SHA3_384_CTX*, const unsigned char*, size_t); PHP_HASH_API void PHP_SAH3384Final(unsigned char[32], PHP_SHA3_384_CTX*); PHP_HASH_API void PHP_SHA3512Init(PHP_SHA3_512_CTX*); PHP_HASH_API void PHP_SHA3512Update(PHP_SHA3_512_CTX*, const unsigned char*, size_t); PHP_HASH_API void PHP_SAH3512Final(unsigned char[32], PHP_SHA3_512_CTX*); #endif PK 2��Z� v92 2 php_hash_snefru.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Wallner <mike@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_SNEFRU_H #define PHP_HASH_SNEFRU_H /* SNEFRU-2.5a with 8 passes and 256 bit hash output * AKA "Xerox Secure Hash Function" */ #include "ext/standard/basic_functions.h" /* SNEFRU context */ typedef struct { uint32_t state[16]; uint32_t count[2]; unsigned char length; unsigned char buffer[32]; } PHP_SNEFRU_CTX; #define PHP_SNEFRU_SPEC "l16l2bb32" PHP_HASH_API void PHP_SNEFRUInit(PHP_SNEFRU_CTX *); PHP_HASH_API void PHP_SNEFRUUpdate(PHP_SNEFRU_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_SNEFRUFinal(unsigned char[32], PHP_SNEFRU_CTX *); #endif PK 2��Z{�A@� � php_hash_tiger.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Wallner <mike@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_TIGER_H #define PHP_HASH_TIGER_H /* TIGER context */ typedef struct { uint64_t state[3]; uint64_t passed; unsigned char buffer[64]; uint32_t length; unsigned int passes:1; } PHP_TIGER_CTX; #define PHP_TIGER_SPEC "q3qb64l" PHP_HASH_API void PHP_3TIGERInit(PHP_TIGER_CTX *context); PHP_HASH_API void PHP_4TIGERInit(PHP_TIGER_CTX *context); PHP_HASH_API void PHP_TIGERUpdate(PHP_TIGER_CTX *context, const unsigned char *input, size_t len); PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context); PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context); PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context); #endif PK 2��Z���u� � php_hash_whirlpool.hnu �[��� /* +----------------------------------------------------------------------+ | Copyright (c) The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Michael Wallner <mike@php.net> | +----------------------------------------------------------------------+ */ #ifndef PHP_HASH_WHIRLPOOL_H #define PHP_HASH_WHIRLPOOL_H /* WHIRLPOOL context */ typedef struct { uint64_t state[8]; unsigned char bitlength[32]; struct { int pos; int bits; unsigned char data[64]; } buffer; } PHP_WHIRLPOOL_CTX; #define PHP_WHIRLPOOL_SPEC "q8b32iib64." PHP_HASH_API void PHP_WHIRLPOOLInit(PHP_WHIRLPOOL_CTX *); PHP_HASH_API void PHP_WHIRLPOOLUpdate(PHP_WHIRLPOOL_CTX *, const unsigned char *, size_t); PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char[64], PHP_WHIRLPOOL_CTX *); #endif PK 2��Z�/ZS� � php_hash.hnu �[��� PK 2��Z��� � php_hash_adler32.hnu �[��� PK 2��Z�=� 4 php_hash_crc32.hnu �[��� PK 2��Z�IAO� � �&