Home
last modified time | relevance | path

Searched refs:digest (Results 1 – 25 of 61) sorted by relevance

123

/php-src/ext/hash/
H A Dhash_murmur.c74 digest[2] = (unsigned char)((ctx->h >> 8) & 0xff); in PHP_MURMUR3AFinal()
75 digest[3] = (unsigned char)(ctx->h & 0xff); in PHP_MURMUR3AFinal()
141 digest[2] = (unsigned char)((h[0] >> 8) & 0xff); in PHP_MURMUR3CFinal()
142 digest[3] = (unsigned char)(h[0] & 0xff); in PHP_MURMUR3CFinal()
145 digest[6] = (unsigned char)((h[1] >> 8) & 0xff); in PHP_MURMUR3CFinal()
146 digest[7] = (unsigned char)(h[1] & 0xff); in PHP_MURMUR3CFinal()
149 digest[10] = (unsigned char)((h[2] >> 8) & 0xff); in PHP_MURMUR3CFinal()
150 digest[11] = (unsigned char)(h[2] & 0xff); in PHP_MURMUR3CFinal()
154 digest[15] = (unsigned char)(h[3] & 0xff); in PHP_MURMUR3CFinal()
223 digest[7] = (unsigned char)(h[0] & 0xff); in PHP_MURMUR3FFinal()
[all …]
H A Dhash_crc32.c67 PHP_HASH_API void PHP_CRC32LEFinal(unsigned char digest[4], PHP_CRC32_CTX *context) in PHP_CRC32LEFinal()
70 digest[3] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_CRC32LEFinal()
71 digest[2] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_CRC32LEFinal()
72 digest[1] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32LEFinal()
73 digest[0] = (unsigned char) (context->state & 0xff); in PHP_CRC32LEFinal()
77 PHP_HASH_API void PHP_CRC32BEFinal(unsigned char digest[4], PHP_CRC32_CTX *context) in PHP_CRC32BEFinal()
80 digest[0] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_CRC32BEFinal()
81 digest[1] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_CRC32BEFinal()
82 digest[2] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_CRC32BEFinal()
83 digest[3] = (unsigned char) (context->state & 0xff); in PHP_CRC32BEFinal()
H A Dhash_adler32.c46 PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *context) in PHP_ADLER32Final()
48 digest[0] = (unsigned char) ((context->state >> 24) & 0xff); in PHP_ADLER32Final()
49 digest[1] = (unsigned char) ((context->state >> 16) & 0xff); in PHP_ADLER32Final()
50 digest[2] = (unsigned char) ((context->state >> 8) & 0xff); in PHP_ADLER32Final()
51 digest[3] = (unsigned char) (context->state & 0xff); in PHP_ADLER32Final()
H A Dphp_hash_tiger.h33 PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context);
34 PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context);
35 PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context);
H A Dhash_fnv.c104 PHP_HASH_API void PHP_FNV132Final(unsigned char digest[4], PHP_FNV132_CTX * context) in PHP_FNV132Final()
107 memcpy(digest, &context->state, 4); in PHP_FNV132Final()
113 digest[i] = c[3 - i]; in PHP_FNV132Final()
139 PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * context) in PHP_FNV164Final()
142 memcpy(digest, &context->state, 8); in PHP_FNV164Final()
148 digest[i] = c[7 - i]; in PHP_FNV164Final()
H A Dhash.c361 zend_string *digest; in php_hash_do_hash() local
502 zend_string *digest; in php_hash_do_hash_hmac() local
784 zend_string *digest; in PHP_FUNCTION() local
968 php_hash_hmac_round(digest, ops, context, K, digest, ops->digest_size); in PHP_FUNCTION()
971 digest, in PHP_FUNCTION()
982 efree(digest); in PHP_FUNCTION()
1068 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
1080 php_hash_hmac_round(digest, ops, context, K1, digest, ops->digest_size); in PHP_FUNCTION()
1081 php_hash_hmac_round(digest, ops, context, K2, digest, ops->digest_size); in PHP_FUNCTION()
1097 efree(digest); in PHP_FUNCTION()
[all …]
H A Dphp_hash_xxhash.h30 PHP_HASH_API void PHP_XXH32Final(unsigned char digest[4], PHP_XXH32_CTX *ctx);
40 PHP_HASH_API void PHP_XXH64Final(unsigned char digest[8], PHP_XXH64_CTX *ctx);
62 PHP_HASH_API void PHP_XXH3_64_Final(unsigned char digest[8], PHP_XXH3_64_CTX *ctx);
69 PHP_HASH_API void PHP_XXH3_128_Final(unsigned char digest[16], PHP_XXH3_128_CTX *ctx);
H A Dhash_joaat.c49 PHP_HASH_API void PHP_JOAATFinal(unsigned char digest[4], PHP_JOAAT_CTX * context) in PHP_JOAATFinal()
57 memcpy(digest, &hval, 4); in PHP_JOAATFinal()
63 digest[i] = c[3 - i]; in PHP_JOAATFinal()
H A Dphp_hash_murmur.h29 PHP_HASH_API void PHP_MURMUR3AFinal(unsigned char digest[4], PHP_MURMUR3A_CTX *ctx);
41 PHP_HASH_API void PHP_MURMUR3CFinal(unsigned char digest[16], PHP_MURMUR3C_CTX *ctx);
53 PHP_HASH_API void PHP_MURMUR3FFinal(unsigned char digest[16], PHP_MURMUR3F_CTX *ctx);
H A Dhash_xxhash.c67 PHP_HASH_API void PHP_XXH32Final(unsigned char digest[4], PHP_XXH32_CTX *ctx) in PHP_XXH32Final()
69 XXH32_canonicalFromHash((XXH32_canonical_t*)digest, XXH32_digest(&ctx->s)); in PHP_XXH32Final()
132 PHP_HASH_API void PHP_XXH64Final(unsigned char digest[8], PHP_XXH64_CTX *ctx) in PHP_XXH64Final()
134 XXH64_canonicalFromHash((XXH64_canonical_t*)digest, XXH64_digest(&ctx->s)); in PHP_XXH64Final()
223 PHP_HASH_API void PHP_XXH3_64_Final(unsigned char digest[8], PHP_XXH3_64_CTX *ctx) in PHP_XXH3_64_Final()
225 XXH64_canonicalFromHash((XXH64_canonical_t*)digest, XXH3_64bits_digest(&ctx->s)); in PHP_XXH3_64_Final()
273 PHP_HASH_API void PHP_XXH3_128_Final(unsigned char digest[16], PHP_XXH3_128_CTX *ctx) in PHP_XXH3_128_Final()
275 XXH128_canonicalFromHash((XXH128_canonical_t*)digest, XXH3_128bits_digest(&ctx->s)); in PHP_XXH3_128_Final()
H A Dphp_hash_crc32.h31 PHP_HASH_API void PHP_CRC32LEFinal(unsigned char digest[4], PHP_CRC32_CTX *context);
32 PHP_HASH_API void PHP_CRC32BEFinal(unsigned char digest[4], PHP_CRC32_CTX *context);
H A Dhash_whirlpool.c373 PHP_HASH_API void PHP_WHIRLPOOLFinal(unsigned char digest[64], PHP_WHIRLPOOL_CTX *context) in PHP_WHIRLPOOLFinal()
418 digest[0] = (unsigned char)(context->state[i] >> 56); in PHP_WHIRLPOOLFinal()
419 digest[1] = (unsigned char)(context->state[i] >> 48); in PHP_WHIRLPOOLFinal()
420 digest[2] = (unsigned char)(context->state[i] >> 40); in PHP_WHIRLPOOLFinal()
421 digest[3] = (unsigned char)(context->state[i] >> 32); in PHP_WHIRLPOOLFinal()
422 digest[4] = (unsigned char)(context->state[i] >> 24); in PHP_WHIRLPOOLFinal()
423 digest[5] = (unsigned char)(context->state[i] >> 16); in PHP_WHIRLPOOLFinal()
424 digest[6] = (unsigned char)(context->state[i] >> 8); in PHP_WHIRLPOOLFinal()
425 digest[7] = (unsigned char)(context->state[i] ); in PHP_WHIRLPOOLFinal()
426 digest += 8; in PHP_WHIRLPOOLFinal()
H A Dhash_sha3.c179 static void PHP_SHA3_Final(unsigned char* digest, in PHP_SHA3_Final() argument
193 digest = zend_mempcpy(digest, ctx->state, bs); in PHP_SHA3_Final()
231 void PHP_SHA3##bits##Final(unsigned char* digest, \
233 PHP_SHA3_Final(digest, ctx, \
326 void PHP_SHA3##bits##Final(unsigned char* digest, \
328 Keccak_HashFinal((Keccak_HashInstance *)ctx, digest); \
H A Dphp_hash_fnv.h56 PHP_HASH_API void PHP_FNV132Final(unsigned char digest[4], PHP_FNV132_CTX * context);
61 PHP_HASH_API void PHP_FNV164Final(unsigned char digest[8], PHP_FNV164_CTX * context);
H A Dhash_tiger.c221 PHP_HASH_API void PHP_TIGER128Final(unsigned char digest[16], PHP_TIGER_CTX *context) in PHP_TIGER128Final()
224 TigerDigest(digest, 16, context); in PHP_TIGER128Final()
228 PHP_HASH_API void PHP_TIGER160Final(unsigned char digest[20], PHP_TIGER_CTX *context) in PHP_TIGER160Final()
231 TigerDigest(digest, 20, context); in PHP_TIGER160Final()
235 PHP_HASH_API void PHP_TIGER192Final(unsigned char digest[24], PHP_TIGER_CTX *context) in PHP_TIGER192Final()
238 TigerDigest(digest, 24, context); in PHP_TIGER192Final()
H A Dhash_sha.c282 PHP_HASH_API void PHP_SHA224Final(unsigned char digest[28], PHP_SHA224_CTX * context) in PHP_SHA224Final()
307 SHAEncode32(digest, context->state, 28); in PHP_SHA224Final()
360 PHP_HASH_API void PHP_SHA256Final(unsigned char digest[32], PHP_SHA256_CTX * context) in PHP_SHA256Final()
385 SHAEncode32(digest, context->state, 32); in PHP_SHA256Final()
574 PHP_HASH_API void PHP_SHA384Final(unsigned char digest[48], PHP_SHA384_CTX * context) in PHP_SHA384Final()
607 SHAEncode64(digest, context->state, 48); in PHP_SHA384Final()
731 PHP_HASH_API void PHP_SHA512Final(unsigned char digest[64], PHP_SHA512_CTX * context) in PHP_SHA512Final()
764 SHAEncode64(digest, context->state, 64); in PHP_SHA512Final()
775 PHP_HASH_API void PHP_SHA512_256Final(unsigned char digest[32], PHP_SHA512_CTX * context) in PHP_SHA512_256Final()
779 memcpy(digest, full_digest, 32); in PHP_SHA512_256Final()
[all …]
H A Dhash_snefru.c170 PHP_HASH_API void PHP_SNEFRUFinal(unsigned char digest[32], PHP_SNEFRU_CTX *context) in PHP_SNEFRUFinal()
183 digest[j] = (unsigned char) ((context->state[i] >> 24) & 0xff); in PHP_SNEFRUFinal()
184 digest[j + 1] = (unsigned char) ((context->state[i] >> 16) & 0xff); in PHP_SNEFRUFinal()
185 digest[j + 2] = (unsigned char) ((context->state[i] >> 8) & 0xff); in PHP_SNEFRUFinal()
186 digest[j + 3] = (unsigned char) (context->state[i] & 0xff); in PHP_SNEFRUFinal()
/php-src/ext/openssl/
H A Dopenssl_pwhash.c138 zend_string *digest = NULL, *salt64 = NULL, *hash64 = NULL; in php_openssl_argon2_hash() local
161 digest = zend_string_alloc(PHP_OPENSSL_DIGEST_SIZE, 0); in php_openssl_argon2_hash()
162 ZSTR_LEN(digest) = snprintf(ZSTR_VAL(digest), ZSTR_LEN(digest), "$%s$v=%d$m=%u,t=%u,p=%u$%s$%s", in php_openssl_argon2_hash()
168 return digest; in php_openssl_argon2_hash()
178 if (!digest || (ZSTR_LEN(digest) < sizeof("$argon2id$"))) { in php_openssl_argon2_extract()
181 p = ZSTR_VAL(digest); in php_openssl_argon2_extract()
322 zend_string *password, *algo, *digest; in PHP_FUNCTION() local
338 if (!digest) { in PHP_FUNCTION()
345 RETURN_NEW_STR(digest); in PHP_FUNCTION()
350 zend_string *password, *algo, *digest; in PHP_FUNCTION() local
[all …]
/php-src/Zend/
H A Dzend_system_id.c66 unsigned char digest[16]; in zend_finalize_system_id() local
92 PHP_MD5Final(digest, &context); in zend_finalize_system_id()
93 php_hash_bin2hex(zend_system_id, digest, sizeof digest); in zend_finalize_system_id()
/php-src/ext/standard/
H A Dmd5.h21 PHPAPI void make_digest(char *md5str, const unsigned char *digest);
22 PHPAPI void make_digest_ex(char *md5str, const unsigned char *digest, int len);
H A Dmd5.c24 make_digest_ex(md5str, digest, 16); in make_digest()
34 md5str[i * 2] = hexits[digest[i] >> 4]; in make_digest_ex()
35 md5str[(i * 2) + 1] = hexits[digest[i] & 0x0F]; in make_digest_ex()
47 unsigned char digest[16]; in PHP_FUNCTION() local
57 PHP_MD5Final(digest, &context); in PHP_FUNCTION()
59 RETURN_STRINGL((char *) digest, 16); in PHP_FUNCTION()
62 make_digest_ex(Z_STRVAL_P(return_value), digest, 16); in PHP_FUNCTION()
75 unsigned char digest[16]; in PHP_FUNCTION() local
100 PHP_MD5Final(digest, &context); in PHP_FUNCTION()
107 PHP_MD5Final(digest, &context); in PHP_FUNCTION()
[all …]
H A Dsha1.c24 PHPAPI void make_sha1_digest(char *sha1str, const unsigned char *digest) in make_sha1_digest() argument
26 make_digest_ex(sha1str, digest, 20); in make_sha1_digest()
35 unsigned char digest[20]; in PHP_FUNCTION() local
45 PHP_SHA1Final(digest, &context); in PHP_FUNCTION()
47 RETURN_STRINGL((char *) digest, 20); in PHP_FUNCTION()
50 make_digest_ex(Z_STRVAL_P(return_value), digest, 20); in PHP_FUNCTION()
65 unsigned char digest[20]; in PHP_FUNCTION() local
87 PHP_SHA1Final(digest, &context); in PHP_FUNCTION()
92 RETURN_STRINGL((char *) digest, 20); in PHP_FUNCTION()
95 make_digest_ex(Z_STRVAL_P(return_value), digest, 20); in PHP_FUNCTION()
[all …]
/php-src/ext/phar/
H A Dutil.c1664 unsigned char digest[64]; in phar_verify_signature() local
1693 if (memcmp(digest, sig, sizeof(digest))) { in phar_verify_signature()
1700 *signature_len = phar_hex_str((const char*)digest, sizeof(digest), signature); in phar_verify_signature()
1704 unsigned char digest[32]; in phar_verify_signature() local
1733 if (memcmp(digest, sig, sizeof(digest))) { in phar_verify_signature()
1740 *signature_len = phar_hex_str((const char*)digest, sizeof(digest), signature); in phar_verify_signature()
1744 unsigned char digest[20]; in phar_verify_signature() local
1773 if (memcmp(digest, sig, sizeof(digest))) { in phar_verify_signature()
1780 *signature_len = phar_hex_str((const char*)digest, sizeof(digest), signature); in phar_verify_signature()
1813 if (memcmp(digest, sig, sizeof(digest))) { in phar_verify_signature()
[all …]
/php-src/ext/standard/tests/strings/
H A Dsha1_basic.phpt13 var_dump(sha1("message digest"));
22 var_dump(sha1("message digest", false));
31 var_dump(bin2hex(sha1("message digest", true)));
/php-src/ext/soap/
H A Dphp_http.c677 zval *digest = Z_CLIENT_DIGEST_P(this_ptr); in make_http_soap_request() local
680 if (Z_TYPE_P(digest) == IS_ARRAY) { in make_http_soap_request()
706 add_assoc_long(digest, "nc", 1); in make_http_soap_request()
1193 zval *digest = Z_CLIENT_DIGEST_P(this_ptr); in make_http_soap_request() local
1200 zval digest; in make_http_soap_request() local
1202 ZVAL_UNDEF(&digest); in make_http_soap_request()
1231 if (Z_TYPE(digest) == IS_UNDEF) { in make_http_soap_request()
1232 array_init(&digest); in make_http_soap_request()
1234 add_assoc_string(&digest, name, val); in make_http_soap_request()
1238 if (Z_TYPE(digest) != IS_UNDEF) { in make_http_soap_request()
[all …]

Completed in 68 milliseconds

123