/PHP-8.4/ext/dom/lexbor/lexbor/core/ |
H A D | utils.c | 30 size_t hash, i; in lexbor_utils_hash_hash() local 32 for (hash = i = 0; i < key_size; i++) { in lexbor_utils_hash_hash() 33 hash += key[i]; in lexbor_utils_hash_hash() 34 hash += (hash << 10); in lexbor_utils_hash_hash() 35 hash ^= (hash >> 6); in lexbor_utils_hash_hash() 38 hash += (hash << 3); in lexbor_utils_hash_hash() 39 hash ^= (hash >> 11); in lexbor_utils_hash_hash() 40 hash += (hash << 15); in lexbor_utils_hash_hash() 42 return hash; in lexbor_utils_hash_hash()
|
H A D | hash.c | 81 memset(hash->table, 0, sizeof(lexbor_hash_t *) * hash->table_size); in lexbor_hash_table_clean() 125 if (hash == NULL) { in lexbor_hash_init() 149 hash->table = lexbor_hash_table_create(hash); in lexbor_hash_init() 170 if (hash == NULL) { in lexbor_hash_destroy() 174 hash->entries = lexbor_dobject_destroy(hash->entries, true); in lexbor_hash_destroy() 175 hash->mraw = lexbor_mraw_destroy(hash->mraw, true); in lexbor_hash_destroy() 176 hash->table = lexbor_hash_table_destroy(hash); in lexbor_hash_destroy() 182 return hash; in lexbor_hash_destroy() 269 lexbor_hash_remove_by_hash_id(hash, search->hash(key, length), in lexbor_hash_remove() 277 return lexbor_hash_search_by_hash_id(hash, search->hash(key, length), in lexbor_hash_search() [all …]
|
H A D | hash.h | 77 lexbor_hash_id_f hash; /* For generate a hash id. */ member 83 lexbor_hash_id_f hash; /* For generate a hash id. */ member 95 lexbor_hash_clean(lexbor_hash_t *hash); 98 lexbor_hash_destroy(lexbor_hash_t *hash, bool destroy_obj); 139 lexbor_hash_copy(lexbor_hash_t *hash, lexbor_hash_entry_t *entry, 155 lexbor_hash_mraw(const lexbor_hash_t *hash) in lexbor_hash_mraw() argument 157 return hash->mraw; in lexbor_hash_mraw() 189 lexbor_mraw_free(hash->mraw, entry->u.long_str); in lexbor_hash_entry_str_free() 196 lexbor_hash_entry_create(lexbor_hash_t *hash) in lexbor_hash_entry_create() argument 208 lexbor_hash_entries_count(lexbor_hash_t *hash) in lexbor_hash_entries_count() argument [all …]
|
/PHP-8.4/ext/hash/tests/ |
H A D | crc32.phpt | 6 echo hash('crc32', ''), "\n"; 7 echo hash('crc32', 'a'), "\n"; 8 echo hash('crc32', 'abc'), "\n"; 29 echo hash('crc32b', ''), "\n"; 30 echo hash('crc32b', 'a'), "\n"; 31 echo hash('crc32b', 'abc'), "\n"; 52 echo hash('crc32c', ''), "\n"; 53 echo hash('crc32c', 'a'), "\n"; 54 echo hash('crc32c', 'ab'), "\n"; 55 echo hash('crc32c', 'abc'), "\n"; [all …]
|
H A D | hash_error.phpt | 2 Hash: hash() function : error conditions 6 echo "*** Testing hash() : error conditions ***\n"; 8 echo "\n-- Testing hash() function with invalid hash algorithm --\n"; 10 hash('foo', ''); 17 *** Testing hash() : error conditions *** 19 -- Testing hash() function with invalid hash algorithm -- 20 hash(): Argument #1 ($algo) must be a valid hashing algorithm
|
H A D | ripemd128.phpt | 5 echo hash('ripemd128', '') . "\n"; 6 echo hash('ripemd128', 'a') . "\n"; 7 echo hash('ripemd128', 'abc') . "\n"; 8 echo hash('ripemd128', 'message digest') . "\n"; 9 echo hash('ripemd128', 'abcdefghijklmnopqrstuvwxyz') . "\n"; 10 echo hash('ripemd128', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 11 echo hash('ripemd128', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; 12 echo hash('ripemd128', '123456789012345678901234567890123456789012345678901234567890123456789012345… 13 echo hash('ripemd128', str_repeat('a', 1000000)) . "\n";
|
H A D | ripemd160.phpt | 5 echo hash('ripemd160', '') . "\n"; 6 echo hash('ripemd160', 'a') . "\n"; 7 echo hash('ripemd160', 'abc') . "\n"; 8 echo hash('ripemd160', 'message digest') . "\n"; 9 echo hash('ripemd160', 'abcdefghijklmnopqrstuvwxyz') . "\n"; 10 echo hash('ripemd160', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 11 echo hash('ripemd160', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; 12 echo hash('ripemd160', '123456789012345678901234567890123456789012345678901234567890123456789012345… 13 echo hash('ripemd160', str_repeat('a', 1000000)) . "\n";
|
H A D | ripemd256.phpt | 5 echo hash('ripemd256', '') . "\n"; 6 echo hash('ripemd256', 'a') . "\n"; 7 echo hash('ripemd256', 'abc') . "\n"; 8 echo hash('ripemd256', 'message digest') . "\n"; 9 echo hash('ripemd256', 'abcdefghijklmnopqrstuvwxyz') . "\n"; 10 echo hash('ripemd256', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 11 echo hash('ripemd256', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; 12 echo hash('ripemd256', '123456789012345678901234567890123456789012345678901234567890123456789012345… 13 echo hash('ripemd256', str_repeat('a', 1000000)) . "\n";
|
H A D | ripemd320.phpt | 5 echo hash('ripemd320', '') . "\n"; 6 echo hash('ripemd320', 'a') . "\n"; 7 echo hash('ripemd320', 'abc') . "\n"; 8 echo hash('ripemd320', 'message digest') . "\n"; 9 echo hash('ripemd320', 'abcdefghijklmnopqrstuvwxyz') . "\n"; 10 echo hash('ripemd320', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 11 echo hash('ripemd320', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; 12 echo hash('ripemd320', '123456789012345678901234567890123456789012345678901234567890123456789012345… 13 echo hash('ripemd320', str_repeat('a', 1000000)) . "\n";
|
H A D | gost.phpt | 5 echo hash('gost', ''), "\n"; 6 echo hash('gost', 'The quick brown fox jumps over the lazy dog'), "\n"; 7 echo hash('gost', 'The quick brown fox jumps over the lazy cog'), "\n"; 8 echo hash('gost', str_repeat('a', 31)), "\n"; 9 echo hash('gost', str_repeat('a', 32)), "\n"; 10 echo hash('gost', str_repeat('a', 33)), "\n"; 12 echo hash('gost-crypto', ''), "\n"; 13 echo hash('gost-crypto', 'The quick brown fox jumps over the lazy dog'), "\n"; 15 echo hash('gost-crypto', str_repeat('a', 31)), "\n"; 16 echo hash('gost-crypto', str_repeat('a', 32)), "\n"; [all …]
|
H A D | adler32.phpt | 5 echo hash('adler32', ''), "\n"; 6 echo hash('adler32', 'a'), "\n"; 7 echo hash('adler32', 'abc'), "\n"; 8 echo hash('adler32', 'message digest'), "\n"; 9 echo hash('adler32', 'abcdefghijklmnopqrstuvwxyz'), "\n"; 10 echo hash('adler32', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), "\n"; 11 echo hash('adler32', '12345678901234567890123456789012345678901234567890123456789012345678901234567…
|
H A D | md2.phpt | 5 echo hash('md2', '') . "\n"; 6 echo hash('md2', 'a') . "\n"; 7 echo hash('md2', 'abc') . "\n"; 8 echo hash('md2', 'message digest') . "\n"; 9 echo hash('md2', 'abcdefghijklmnopqrstuvwxyz') . "\n"; 10 echo hash('md2', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; 11 echo hash('md2', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'…
|
H A D | md4.phpt | 6 echo hash('md4', '') . "\n"; 7 echo hash('md4', 'a') . "\n"; 8 echo hash('md4', 'abc') . "\n"; 9 echo hash('md4', 'message digest') . "\n"; 10 echo hash('md4', 'abcdefghijklmnopqrstuvwxyz') . "\n"; 11 echo hash('md4', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; 12 echo hash('md4', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'…
|
H A D | bug73127.phpt | 2 Bug #73127 (gost-crypto hash incorrect if input data contains long 0xFF sequence) 8 echo hash('gost-crypto', $test1), 10 hash('gost', $test1), 12 hash('gost-crypto', $test2), 14 hash('gost', $test2), 16 hash('gost-crypto', ''), 18 hash('gost', '')
|
H A D | murmurhash3.phpt | 6 $h = hash("murmur3a", "foo"); 9 $h = hash("murmur3c", "Two hashes meet in a bar", false); 11 $h = hash("murmur3c", "hash me!"); 14 $h = hash("murmur3f", "Two hashes meet in a bar", false); 16 $h = hash("murmur3f", "hash me!"); 23 $h1 = hash("murmur3a", "hello there"); 30 $h1 = hash("murmur3c", "hello there"); 37 $h1 = hash("murmur3f", "hello there");
|
H A D | sha1.phpt | 5 echo hash('sha1', '') . "\n"; 6 echo hash('sha1', 'a') . "\n"; 7 echo hash('sha1', '012345678901234567890123456789012345678901234567890123456789') . "\n"; 10 echo hash('sha1', 'abc') . "\n"; 11 echo hash('sha1', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 12 echo hash('sha1', str_repeat('a', 1000000)) . "\n";
|
H A D | sha224.phpt | 5 echo hash('sha224', '') . "\n"; 6 echo hash('sha224', 'a') . "\n"; 7 echo hash('sha224', '012345678901234567890123456789012345678901234567890123456789') . "\n"; 10 echo hash('sha224', 'abc') . "\n"; 11 echo hash('sha224', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 12 echo hash('sha224', str_repeat('a', 1000000)) . "\n";
|
H A D | sha256.phpt | 5 echo hash('sha256', '') . "\n"; 6 echo hash('sha256', 'a') . "\n"; 7 echo hash('sha256', '012345678901234567890123456789012345678901234567890123456789') . "\n"; 10 echo hash('sha256', 'abc') . "\n"; 11 echo hash('sha256', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n"; 12 echo hash('sha256', str_repeat('a', 1000000)) . "\n";
|
H A D | sha384.phpt | 5 echo hash('sha384', '') . "\n"; 6 echo hash('sha384', 'a') . "\n"; 7 echo hash('sha384', '012345678901234567890123456789012345678901234567890123456789') . "\n"; 10 echo hash('sha384', 'abc') . "\n"; 11 echo hash('sha384', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmno… 12 echo hash('sha384', str_repeat('a', 1000000)) . "\n";
|
H A D | sha512.phpt | 5 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";
|
/PHP-8.4/ext/standard/ |
H A D | password.c | 117 const char *h = ZSTR_VAL(hash); in php_password_bcrypt_valid() 162 if (ZSTR_LEN(hash) < 13) { in php_password_bcrypt_verify() 242 if (!hash || (ZSTR_LEN(hash) < sizeof("$argon2id$"))) { in extract_argon2_parameters() 513 if (!hash || ZSTR_LEN(hash) < 3) { in php_password_algo_extract_ident() 518 ident = ZSTR_VAL(hash) + 1; in php_password_algo_extract_ident() 545 zend_string *hash, *ident; in PHP_FUNCTION() local 549 Z_PARAM_STR(hash) in PHP_FUNCTION() 582 zend_string *hash; in PHP_FUNCTION() local 589 Z_PARAM_STR(hash) in PHP_FUNCTION() 614 zend_string *password, *hash; in PHP_FUNCTION() local [all …]
|
/PHP-8.4/Zend/ |
H A D | zend_string.h | 526 hash = hash * Z_L(33) + *str; in zend_inline_hash_func() 531 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 532 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 533 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 534 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 535 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 536 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 537 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 538 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 541 case 7: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func() [all …]
|
/PHP-8.4/ext/standard/tests/password/ |
H A D | password_needs_rehash_argon2.phpt | 11 $hash = password_hash('test', PASSWORD_ARGON2I); 12 var_dump(password_needs_rehash($hash, PASSWORD_ARGON2I)); 13 var_dump(password_needs_rehash($hash, PASSWORD_ARGON2I, ['memory_cost' => PASSWORD_ARGON2_DEFAULT_M… 14 var_dump(password_needs_rehash($hash, PASSWORD_ARGON2I, ['time_cost' => PASSWORD_ARGON2_DEFAULT_TIM… 16 $hash = password_hash('test', PASSWORD_ARGON2ID); 17 var_dump(password_needs_rehash($hash, PASSWORD_ARGON2ID)); 18 var_dump(password_needs_rehash($hash, PASSWORD_ARGON2ID, ['memory_cost' => PASSWORD_ARGON2_DEFAULT_… 19 var_dump(password_needs_rehash($hash, PASSWORD_ARGON2ID, ['time_cost' => PASSWORD_ARGON2_DEFAULT_TI…
|
/PHP-8.4/ext/dom/lexbor/lexbor/ns/ |
H A D | ns.c | 17 lxb_ns_append(lexbor_hash_t *hash, const lxb_char_t *link, size_t length) in lxb_ns_append() argument 32 data = lexbor_hash_insert(hash, lexbor_hash_insert_lower, link, length); in lxb_ns_append() 43 lxb_ns_by_id(lexbor_hash_t *hash, lxb_ns_id_t ns_id, size_t *length) in lxb_ns_by_id() argument 47 data = lxb_ns_data_by_id(hash, ns_id); in lxb_ns_by_id() 64 lxb_ns_data_by_id(lexbor_hash_t *hash, lxb_ns_id_t ns_id) in lxb_ns_data_by_id() argument 78 lxb_ns_data_by_link(lexbor_hash_t *hash, const lxb_char_t *link, size_t length) in lxb_ns_data_by_link() argument 92 return lexbor_hash_search(hash, lexbor_hash_search_lower, link, length); in lxb_ns_data_by_link() 97 lxb_ns_prefix_append(lexbor_hash_t *hash, in lxb_ns_prefix_append() argument 113 data = lexbor_hash_insert(hash, lexbor_hash_insert_lower, prefix, length); in lxb_ns_prefix_append() 124 lxb_ns_prefix_data_by_id(lexbor_hash_t *hash, lxb_ns_prefix_id_t prefix_id) in lxb_ns_prefix_data_by_id() argument [all …]
|
/PHP-8.4/ext/dom/lexbor/lexbor/tag/ |
H A D | tag.c | 13 lxb_tag_append(lexbor_hash_t *hash, lxb_tag_id_t tag_id, in lxb_tag_append() argument 25 data = lexbor_hash_insert(hash, lexbor_hash_insert_raw, name, length); in lxb_tag_append() 41 lxb_tag_append_lower(lexbor_hash_t *hash, const lxb_char_t *name, size_t length) in lxb_tag_append_lower() argument 52 data = lexbor_hash_insert(hash, lexbor_hash_insert_lower, name, length); in lxb_tag_append_lower() 77 lxb_tag_data_by_name(lexbor_hash_t *hash, const lxb_char_t *name, size_t len) in lxb_tag_data_by_name() argument 91 return (const lxb_tag_data_t *) lexbor_hash_search(hash, in lxb_tag_data_by_name() 97 lxb_tag_data_by_name_upper(lexbor_hash_t *hash, 115 return (const lxb_tag_data_t *) lexbor_hash_search(hash, 138 return lxb_tag_id_by_name(hash, name, len); in lxb_tag_id_by_name_noi() 142 lxb_tag_mraw_noi(lexbor_hash_t *hash) in lxb_tag_mraw_noi() argument [all …]
|