Home
last modified time | relevance | path

Searched refs:hash (Results 26 – 50 of 210) sorted by relevance

123456789

/php-src/ext/hash/tests/
H A Dsha512.phpt5 echo hash('sha512', '') . "\n";
6 echo hash('sha512', 'a') . "\n";
7 echo hash('sha512', '012345678901234567890123456789012345678901234567890123456789') . "\n";
10 echo hash('sha512', 'abc') . "\n";
11 echo hash('sha512', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmno…
12 echo hash('sha512', str_repeat('a', 1000000)) . "\n";
H A Dbug70312.phpt5 var_dump(hash('haval128,5', '1234567890123456789012345678901234567890123456789012345678901234'));
6 var_dump(hash('haval160,5', '1234567890123456789012345678901234567890123456789012345678901234'));
7 var_dump(hash('haval192,5', '1234567890123456789012345678901234567890123456789012345678901234'));
8 var_dump(hash('haval224,5', '1234567890123456789012345678901234567890123456789012345678901234'));
9 var_dump(hash('haval256,5', '1234567890123456789012345678901234567890123456789012345678901234'));
H A Dtiger.phpt5 echo hash('tiger192,3', ''),"\n";
6 echo hash('tiger192,3', 'abc'),"\n";
7 echo hash('tiger192,3', str_repeat('a', 63)),"\n";
8 echo hash('tiger192,3', str_repeat('abc', 61)),"\n";
9 echo hash('tiger192,3', str_repeat('abc', 64)),"\n";
H A Dhash_update_stream_basic_001.phpt2 Ensure hash_update_stream() always returns the same hash when $length = 0
12 // Create pseudo-random hash
14 $hash = sha1(bin2hex($bytes));
16 // Create temp file with hash
18 fwrite($fp, $hash);
21 // Stream it with 0 length and output hash
H A Dsnefru.phpt5 echo hash('snefru', ''), "\n";
6 echo hash('snefru', 'The quick brown fox jumps over the lazy dog'), "\n";
7 echo hash('snefru', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), "\n";
8 echo hash('snefru', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), "\n";
9 echo hash('snefru', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), "\n";
H A Dmd5.phpt5 echo hash('md5', '') . "\n";
6 echo hash('md5', 'a') . "\n";
7 echo hash('md5', '012345678901234567890123456789012345678901234567890123456789') . "\n";
8 echo hash('md5', str_repeat('a', 1000000)) . "\n";
H A Dhash_hmac_error.phpt6 * Function is implemented in ext/hash/hash.c
14 echo "\n-- Testing hash_hmac() function with invalid hash algorithm --\n";
22 echo "\n-- Testing hash_hmac() function with non-cryptographic hash algorithm --\n";
34 -- Testing hash_hmac() function with invalid hash algorithm --
37 -- Testing hash_hmac() function with non-cryptographic hash algorithm --
H A Dhash_hmac_file_error.phpt6 echo "*** Testing hash() : error conditions ***\n";
11 echo "\n-- Testing hash_hmac_file() function with invalid hash algorithm --\n";
19 echo "\n-- Testing hash_hmac_file() function with non-cryptographic hash algorithm --\n";
37 *** Testing hash() : error conditions ***
39 -- Testing hash_hmac_file() function with invalid hash algorithm --
42 -- Testing hash_hmac_file() function with non-cryptographic hash algorithm --
H A Dsha512-224.phpt5 echo hash('sha512/224', '') . "\n";
6 echo hash('sha512/224', 'abc') . "\n";
7 echo hash('sha512/224', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjk…
H A Dsha512-256.phpt5 echo hash('sha512/256', '') . "\n";
6 echo hash('sha512/256', 'abc') . "\n";
7 echo hash('sha512/256', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjk…
H A Dwhirlpool.phpt5 echo hash('whirlpool', ''), "\n";
6 echo hash('whirlpool', $s='---qwertzuiopasdfghjklyxcvbnm------qwertzuiopasdfghjklyxcvbnm---'), "\n";
7 echo hash('whirlpool', str_repeat($s.'0', 1000)), "\n";
H A Dmhash_003.phpt22 foreach ($supported_hash_al as $hash=>$wanted) {
23 $passwd = str_repeat($hash, 10);
24 $salt = str_repeat($hash, 2);
25 $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100);
27 echo "$hash\nok\n";
29 echo "$hash: ";
31 echo "$hash: ";
/php-src/ext/dom/lexbor/lexbor/encoding/
H A Dencode.c154 if (hash == NULL) { in lxb_encoding_encode_big5()
218 if (hash == NULL) { in lxb_encoding_encode_euc_jp()
251 if (hash == NULL) { in lxb_encoding_encode_euc_kr()
294 if (hash == NULL) { in lxb_encoding_encode_gbk()
1122 if (hash == NULL) { in lxb_encoding_encode_big5_single()
1183 if (hash == NULL) { in lxb_encoding_encode_euc_jp_single()
1211 if (hash == NULL) { in lxb_encoding_encode_euc_kr_single()
1245 if (hash != NULL) { in lxb_encoding_encode_gbk_single()
1421 if (hash == NULL) { in lxb_encoding_encode_iso_2022_jp_single()
1632 if (hash == NULL) { in lxb_encoding_encode_shift_jis_single()
[all …]
/php-src/ext/hash/
H A Dhash.c423 PHP_FUNCTION(hash) in PHP_FUNCTION() argument
650 hash->ops = ops; in PHP_FUNCTION()
653 hash->key = NULL; in PHP_FUNCTION()
808 hash->ops->hash_init(hash->context, NULL); in PHP_FUNCTION()
809 hash->ops->hash_update(hash->context, hash->key, hash->ops->block_size); in PHP_FUNCTION()
810 hash->ops->hash_update(hash->context, (unsigned char *) ZSTR_VAL(digest), hash->ops->digest_size); in PHP_FUNCTION()
814 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in PHP_FUNCTION()
1383 if (hash->key) { in php_hashcontext_dtor()
1384 ZEND_SECURE_ZERO(hash->key, hash->ops->block_size); in php_hashcontext_dtor()
1475 if (hash->ops->hash_serialize(hash, &magic, &tmp) != SUCCESS) { in PHP_METHOD()
[all …]
H A Dconfig.w323 ARG_WITH('mhash', 'mhash support (BC via hash)', 'no');
12 EXTENSION('hash', 'hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c ' +
17 var hash_sha3_dir = 'ext/hash/sha3/generic' + (X64 ? '64' : '32') + 'lc';
20 ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-opt64.c', 'hash');
22 ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-inplace32BI.c', 'hash');
32 ADD_SOURCES('ext/hash/murmur', 'PMurHash.c PMurHash128.c', 'hash');
34 PHP_INSTALL_HEADERS('ext/hash', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
/php-src/ext/dom/lexbor/lexbor/ns/
H A Dns.h41 lxb_ns_by_id(lexbor_hash_t *hash, lxb_ns_id_t ns_id, size_t *length);
44 lxb_ns_data_by_id(lexbor_hash_t *hash, lxb_ns_id_t ns_id);
47 lxb_ns_data_by_link(lexbor_hash_t *hash, const lxb_char_t *name, size_t length);
51 lxb_ns_prefix_append(lexbor_hash_t *hash,
55 lxb_ns_prefix_data_by_id(lexbor_hash_t *hash, lxb_ns_prefix_id_t prefix_id);
58 lxb_ns_prefix_data_by_name(lexbor_hash_t *hash,
/php-src/ext/standard/
H A Dphp_password.h39 zend_string *(*hash)(const zend_string *password, zend_array *options); member
40 bool (*verify)(const zend_string *password, const zend_string *hash);
42 int (*get_info)(zval *return_value, const zend_string *hash);
43 bool (*valid)(const zend_string *hash);
59 static inline const php_password_algo* php_password_algo_identify(const zend_string *hash) { in php_password_algo_identify() argument
60 return php_password_algo_identify_ex(hash, php_password_algo_default()); in php_password_algo_identify()
/php-src/ext/opcache/jit/ir/
H A Dgen_ir_fold_hash.c56 uint32_t hash[MAX_SLOTS]; in find_hash() local
70 if (hash[h]) { in find_hash()
73 if (!hash[h]) { in find_hash()
74 hash[h] = mask[i]; in find_hash()
81 hash[h] = mask[i]; in find_hash()
84 print_hash(hash, n); in find_hash()
98 if (hash[h]) { in find_hash()
101 if (!hash[h]) { in find_hash()
109 hash[h] = mask[i]; in find_hash()
126 hash[0] = 0; in find_hash()
[all …]
/php-src/ext/phar/tests/tar/
H A Dphar_setsignaturealgo2.phpt2 Phar::setSupportedSignatures() with hash, tar-based
57 ["hash"]=>
63 ["hash"]=>
69 ["hash"]=>
75 ["hash"]=>
81 ["hash"]=>
87 ["hash"]=>
93 ["hash"]=>
99 ["hash"]=>
/php-src/ext/openssl/tests/
H A Dopenssl_x509_fingerprint_basic.phpt13 echo "** Testing hash method md5 **\n";
19 echo "** Testing hash method sha1 with resource **\n";
25 echo "** Testing bad hash method **\n";
31 ** Testing hash method md5 **
35 ** Testing hash method sha1 with resource **
41 ** Testing bad hash method **
/php-src/ext/phar/tests/
H A Dphar_setsignaturealgo2.phpt2 Phar::setSupportedSignatures() with hash
53 ["hash"]=>
59 ["hash"]=>
65 ["hash"]=>
71 ["hash"]=>
77 ["hash"]=>
83 ["hash"]=>
/php-src/ext/sodium/
H A Dsodium_pwhash.c88 static bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { in php_sodium_argon2_verify() argument
89 if ((ZSTR_LEN(password) >= 0xffffffff) || (ZSTR_LEN(hash) >= 0xffffffff)) { in php_sodium_argon2_verify()
92 return crypto_pwhash_str_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password)) == 0; in php_sodium_argon2_verify()
95 static bool php_sodium_argon2_needs_rehash(const zend_string *hash, zend_array *options) { in php_sodium_argon2_needs_rehash() argument
101 return crypto_pwhash_str_needs_rehash(ZSTR_VAL(hash), opslimit, memlimit); in php_sodium_argon2_needs_rehash()
104 static int php_sodium_argon2_get_info(zval *return_value, const zend_string *hash) { in php_sodium_argon2_get_info() argument
110 if (!hash || (ZSTR_LEN(hash) < sizeof("$argon2id$"))) { in php_sodium_argon2_get_info()
114 p = ZSTR_VAL(hash); in php_sodium_argon2_get_info()
/php-src/ext/session/
H A Dmod_mm.c53 ps_sd **hash; member
104 mm_free(data->mm, data->hash); in hash_split()
106 data->hash = nhash; in hash_split()
132 sd->next = data->hash[slot]; in ps_sd_new()
133 data->hash[slot] = sd; in ps_sd_new()
154 if (data->hash[slot] == sd) { in ps_sd_destroy()
155 data->hash[slot] = sd->next; in ps_sd_destroy()
194 ret->next = data->hash[slot]; in ps_sd_lookup()
195 data->hash[slot] = ret; in ps_sd_lookup()
234 if (!data->hash) { in ps_mm_initialize()
[all …]
/php-src/ext/sodium/tests/
H A Dpwhash_scrypt.phpt12 $hash = sodium_crypto_pwhash_scryptsalsa208sha256_str
15 var_dump(substr($hash, 0, 3) ===
18 $c = sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($hash, $passwd);
21 $c = sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($hash, 'passwd');
/php-src/ext/intl/collator/
H A Dcollator_convert.c36 HashTable* hash, zval *hashData, zend_string *hashKey, zend_ulong hashIndex, in collator_convert_hash_item_from_utf8_to_utf16() argument
66 zend_hash_update( hash, hashKey, &znew_val); in collator_convert_hash_item_from_utf8_to_utf16()
70 zend_hash_index_update( hash, hashIndex, &znew_val); in collator_convert_hash_item_from_utf8_to_utf16()
77 HashTable* hash, zval * hashData, zend_string* hashKey, zend_ulong hashIndex, in collator_convert_hash_item_from_utf16_to_utf8() argument
103 zend_hash_update( hash, hashKey, &znew_val); in collator_convert_hash_item_from_utf16_to_utf8()
107 zend_hash_index_update( hash, hashIndex, &znew_val); in collator_convert_hash_item_from_utf16_to_utf8()
115 void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* status ) in collator_convert_hash_from_utf8_to_utf16() argument
121 ZEND_HASH_FOREACH_KEY_VAL(hash, hashIndex, hashKey, hashData) { in collator_convert_hash_from_utf8_to_utf16()
124 hash, hashData, hashKey, hashIndex, status ); in collator_convert_hash_from_utf8_to_utf16()
140 ZEND_HASH_FOREACH_KEY_VAL(hash, hashIndex, hashKey, hashData) { in collator_convert_hash_from_utf16_to_utf8()
[all …]

Completed in 42 milliseconds

123456789