/PHP-7.4/ext/hash/ |
H A D | config.w32 | 3 ARG_WITH('mhash', 'mhash support (BC via hash)', 'no'); 14 EXTENSION('hash', 'hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c ' + 19 var hash_sha3_dir = 'ext/hash/sha3/generic' + (X64 ? '64' : '32') + 'lc'; 22 ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-opt64.c', 'hash'); 24 ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-inplace32BI.c', 'hash'); 34 PHP_INSTALL_HEADERS('ext/hash/', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
|
H A D | hash.c | 187 PHP_FUNCTION(hash) in PHP_FUNCTION() argument 383 hash->ops = ops; in PHP_FUNCTION() 386 hash->key = NULL; in PHP_FUNCTION() 471 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION() 507 hash->ops->hash_update(hash->context, (unsigned char *) buf, n); in PHP_FUNCTION() 545 hash->ops->hash_init(hash->context); in PHP_FUNCTION() 546 hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); in PHP_FUNCTION() 547 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION() 551 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in PHP_FUNCTION() 1137 hash->ops->hash_final(dummy, hash->context); in php_hashcontext_dtor() [all …]
|
/PHP-7.4/ext/hash/tests/ |
H A D | sha512-224.phpt | 5 echo hash('sha512/224', '') . "\n"; 6 echo hash('sha512/224', 'abc') . "\n"; 7 echo hash('sha512/224', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjk…
|
H A D | sha512-256.phpt | 5 echo hash('sha512/256', '') . "\n"; 6 echo hash('sha512/256', 'abc') . "\n"; 7 echo hash('sha512/256', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjk…
|
H A D | whirlpool.phpt | 5 echo hash('whirlpool', ''), "\n"; 6 echo hash('whirlpool', $s='---qwertzuiopasdfghjklyxcvbnm------qwertzuiopasdfghjklyxcvbnm---'), "\n"; 7 echo hash('whirlpool', str_repeat($s.'0', 1000)), "\n";
|
H A D | mhash_001.phpt | 24 foreach ($supported_hash_al as $hash=>$wanted) { 25 $result = mhash(constant($hash), $data); 27 echo "$hash\nok\n"; 29 echo "$hash: "; 31 echo "$hash: ";
|
H A D | hash_hmac_file_error.phpt | 7 * Description: Generate a keyed hash value using the HMAC method and the contents of a given file 8 * Source code: ext/hash/hash.c 12 echo "*** Testing hash() : error conditions ***\n"; 26 echo "\n-- Testing hash_hmac_file() function with invalid hash algorithm --\n"; 29 echo "\n-- Testing hash_hmac_file() function with non-cryptographic hash algorithm --\n"; 38 *** Testing hash() : error conditions *** 55 -- Testing hash_hmac_file() function with invalid hash algorithm -- 59 -- Testing hash_hmac_file() function with non-cryptographic hash algorithm --
|
H A D | hash_hmac_error.phpt | 7 * Function is implemented in ext/hash/hash.c 24 echo "\n-- Testing hash_hmac() function with invalid hash algorithm --\n"; 27 echo "\n-- Testing hash_hmac() function with non-cryptographic hash algorithm --\n"; 51 -- Testing hash_hmac() function with invalid hash algorithm -- 56 -- Testing hash_hmac() function with non-cryptographic hash algorithm --
|
H A D | bug64745.phpt | 5 $hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0); 8 var_dump($hash);
|
/PHP-7.4/ext/sodium/tests/ |
H A D | pwhash_scrypt.phpt | 10 $hash = sodium_crypto_pwhash_scryptsalsa208sha256_str 13 var_dump(substr($hash, 0, 3) === 16 $c = sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($hash, $passwd); 19 $c = sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($hash, 'passwd');
|
H A D | pwhash_argon2i.phpt | 10 $hash = sodium_crypto_pwhash_str 13 var_dump(substr($hash, 0, strlen(SODIUM_CRYPTO_PWHASH_STRPREFIX)) === 24 $c = sodium_crypto_pwhash_str_verify($hash, $passwd); 27 $c = sodium_crypto_pwhash_str_verify($hash, 'passwd');
|
H A D | php_password_verify.phpt | 10 $hash = sodium_crypto_pwhash_str("test", SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_P… 11 list(, $algo) = explode('$', $hash, 3); 38 $hash = sodium_crypto_pwhash_str($password, $ops, $mem); 39 echo "Hash: "; var_dump($hash); 40 var_dump(password_verify($password, $hash)); 44 var_dump(password_verify($password, $hash));
|
/PHP-7.4/ext/phar/tests/ |
H A D | phar_setsignaturealgo2.phpt | 2 Phar::setSupportedSignatures() with hash 53 ["hash"]=> 59 ["hash"]=> 65 ["hash"]=> 71 ["hash"]=> 77 ["hash"]=> 83 ["hash"]=>
|
H A D | create_new_and_modify.phpt | 39 var_dump($sig1['hash']); 40 var_dump($sig2['hash']); 41 var_dump($sig1['hash'] != $sig2['hash']);
|
/PHP-7.4/ext/phar/tests/tar/ |
H A D | phar_setsignaturealgo2.phpt | 2 Phar::setSupportedSignatures() with hash, tar-based 52 ["hash"]=> 58 ["hash"]=> 64 ["hash"]=> 70 ["hash"]=> 76 ["hash"]=> 82 ["hash"]=>
|
/PHP-7.4/ext/session/ |
H A D | mod_mm.c | 55 ps_sd **hash; member 105 mm_free(data->mm, data->hash); in hash_split() 107 data->hash = nhash; in hash_split() 136 sd->next = data->hash[slot]; in ps_sd_new() 137 data->hash[slot] = sd; in ps_sd_new() 158 if (data->hash[slot] == sd) { in ps_sd_destroy() 159 data->hash[slot] = sd->next; in ps_sd_destroy() 197 ret->next = data->hash[slot]; in ps_sd_lookup() 198 data->hash[slot] = ret; in ps_sd_lookup() 237 if (!data->hash) { in ps_mm_initialize() [all …]
|
/PHP-7.4/ext/openssl/tests/ |
H A D | openssl_x509_fingerprint_basic.phpt | 16 echo "** Testing hash method md5 **\n"; 22 echo "** Testing hash method sha1 with resource **\n"; 28 echo "** Testing bad hash method **\n"; 38 ** Testing hash method md5 ** 42 ** Testing hash method sha1 with resource ** 48 ** Testing bad hash method **
|
/PHP-7.4/ext/sodium/ |
H A D | sodium_pwhash.c | 100 static zend_bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { in php_sodium_argon2_verify() argument 101 if ((ZSTR_LEN(password) >= 0xffffffff) || (ZSTR_LEN(hash) >= 0xffffffff)) { in php_sodium_argon2_verify() 104 return crypto_pwhash_str_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password)) == 0; in php_sodium_argon2_verify() 107 static zend_bool php_sodium_argon2_needs_rehash(const zend_string *hash, zend_array *options) { in php_sodium_argon2_needs_rehash() argument 113 return crypto_pwhash_str_needs_rehash(ZSTR_VAL(hash), opslimit, memlimit); in php_sodium_argon2_needs_rehash() 116 static int php_sodium_argon2_get_info(zval *return_value, const zend_string *hash) { in php_sodium_argon2_get_info() argument 122 if (!hash || (ZSTR_LEN(hash) < sizeof("$argon2id$"))) { in php_sodium_argon2_get_info() 126 p = ZSTR_VAL(hash); in php_sodium_argon2_get_info()
|
/PHP-7.4/ext/standard/tests/password/ |
H A D | password_hash.phpt | 16 $hash = password_hash("foo", $algo); 17 var_dump($hash === crypt("foo", $hash));
|
H A D | password_hash_argon2.phpt | 21 $hash = password_hash($password, $algo); 22 var_dump(password_verify($password, $hash)); 23 var_dump(password_get_info($hash)['algo']);
|
H A D | bug75221.phpt | 9 $hash = password_hash( 14 var_dump(substr($hash, -1, 1) !== "\0");
|
/PHP-7.4/ext/intl/collator/ |
H A D | collator_convert.c | 38 HashTable* hash, zval *hashData, zend_string *hashKey, zend_ulong hashIndex, in collator_convert_hash_item_from_utf8_to_utf16() argument 68 zend_hash_update( hash, hashKey, &znew_val); in collator_convert_hash_item_from_utf8_to_utf16() 72 zend_hash_index_update( hash, hashIndex, &znew_val); in collator_convert_hash_item_from_utf8_to_utf16() 79 HashTable* hash, zval * hashData, zend_string* hashKey, zend_ulong hashIndex, in collator_convert_hash_item_from_utf16_to_utf8() argument 105 zend_hash_update( hash, hashKey, &znew_val); in collator_convert_hash_item_from_utf16_to_utf8() 109 zend_hash_index_update( hash, hashIndex, &znew_val); in collator_convert_hash_item_from_utf16_to_utf8() 117 void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* status ) in collator_convert_hash_from_utf8_to_utf16() argument 123 ZEND_HASH_FOREACH_KEY_VAL(hash, hashIndex, hashKey, hashData) { in collator_convert_hash_from_utf8_to_utf16() 126 hash, hashData, hashKey, hashIndex, status ); in collator_convert_hash_from_utf8_to_utf16() 142 ZEND_HASH_FOREACH_KEY_VAL(hash, hashIndex, hashKey, hashData) { in collator_convert_hash_from_utf16_to_utf8() [all …]
|
/PHP-7.4/ext/standard/tests/array/ |
H A D | bug70910.phpt | 8 $hash = ['var' => 'new value']; 10 extract($hash);
|
/PHP-7.4/ext/phar/tests/zip/ |
H A D | phar_setsignaturealgo2.phpt | 2 Phar::setSupportedSignatures() with hash, zip-based 79 ["hash"]=> 85 ["hash"]=> 91 ["hash"]=> 97 ["hash"]=> 103 ["hash"]=> 109 ["hash"]=>
|
/PHP-7.4/ext/dba/libcdb/ |
H A D | cdb_make.c | 63 c->hash = 0; in cdb_make_start() 178 c->hash = c->split + c->numentries; in cdb_make_finish() 200 c->hash[u].h = c->hash[u].p = 0; in cdb_make_finish() 205 while (c->hash[where].p) in cdb_make_finish() 208 c->hash[where] = *hp++; in cdb_make_finish() 212 uint32_pack(buf, c->hash[u].h); in cdb_make_finish() 213 uint32_pack(buf + 4, c->hash[u].p); in cdb_make_finish()
|