Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 208) sorted by relevance

123456789

/php-src/ext/dom/lexbor/lexbor/core/
H A Dutils.c30 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 Dhash.c81 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 Dhash.h77 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-src/ext/hash/tests/
H A Dcrc32.phpt6 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 Dhash_error.phpt2 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 Dripemd128.phpt5 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 Dripemd160.phpt5 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 Dripemd256.phpt5 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 Dripemd320.phpt5 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 Dgost.phpt5 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 Dadler32.phpt5 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 Dmd2.phpt5 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 Dmd4.phpt6 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 Dbug73127.phpt2 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 Dmurmurhash3.phpt6 $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 Dsha384.phpt5 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 Dsha1.phpt5 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 Dsha224.phpt5 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 Dsha256.phpt5 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";
/php-src/ext/dom/lexbor/lexbor/tag/
H A Dtag.h32 lxb_tag_data_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id);
38 lxb_tag_data_by_name_upper(lexbor_hash_t *hash,
45 lxb_tag_name_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id, size_t *len) in lxb_tag_name_by_id() argument
47 const lxb_tag_data_t *data = lxb_tag_data_by_id(hash, tag_id); in lxb_tag_name_by_id()
66 const lxb_tag_data_t *data = lxb_tag_data_by_id(hash, tag_id); in lxb_tag_name_upper_by_id()
94 lxb_tag_mraw(lexbor_hash_t *hash) in lxb_tag_mraw() argument
96 return lexbor_hash_mraw(hash); in lxb_tag_mraw()
104 lxb_tag_name_by_id_noi(lexbor_hash_t *hash, lxb_tag_id_t tag_id,
108 lxb_tag_name_upper_by_id_noi(lexbor_hash_t *hash,
112 lxb_tag_id_by_name_noi(lexbor_hash_t *hash,
[all …]
H A Dtag.c13 lxb_tag_append(lexbor_hash_t *hash, lxb_tag_id_t tag_id, in lxb_tag_append() argument
63 lxb_tag_data_by_id(lexbor_hash_t *hash, lxb_tag_id_t tag_id) in lxb_tag_data_by_id() 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,
126 return lxb_tag_name_by_id(hash, tag_id, len); in lxb_tag_name_by_id_noi()
130 lxb_tag_name_upper_by_id_noi(lexbor_hash_t *hash, in lxb_tag_name_upper_by_id_noi() argument
133 return lxb_tag_name_upper_by_id(hash, tag_id, len); in lxb_tag_name_upper_by_id_noi()
139 return lxb_tag_id_by_name(hash, name, len); in lxb_tag_id_by_name_noi()
143 lxb_tag_mraw_noi(lexbor_hash_t *hash) in lxb_tag_mraw_noi() argument
[all …]
/php-src/ext/standard/
H A Dpassword.c117 const char *h = ZSTR_VAL(hash); in php_password_bcrypt_valid()
162 if (ZSTR_LEN(hash) < 13) { in php_password_bcrypt_verify()
244 if (!hash || (ZSTR_LEN(hash) < sizeof("$argon2id$"))) { in extract_argon2_parameters()
515 if (!hash || ZSTR_LEN(hash) < 3) { in php_password_algo_extract_ident()
520 ident = ZSTR_VAL(hash) + 1; in php_password_algo_extract_ident()
547 zend_string *hash, *ident; in PHP_FUNCTION() local
551 Z_PARAM_STR(hash) in PHP_FUNCTION()
584 zend_string *hash; in PHP_FUNCTION() local
591 Z_PARAM_STR(hash) in PHP_FUNCTION()
616 zend_string *password, *hash; in PHP_FUNCTION() local
[all …]
/php-src/Zend/
H A Dzend_string.h526 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-src/ext/standard/tests/password/
H A Dpassword_needs_rehash_argon2.phpt11 $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-src/ext/dom/lexbor/lexbor/ns/
H A Dns.c17 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 …]

Completed in 43 milliseconds

123456789