/PHP-8.3/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";
|
H A D | bug70312.phpt | 5 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 D | tiger.phpt | 5 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 D | hash_update_stream_basic_001.phpt | 2 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
|
/PHP-8.3/ext/standard/ |
H A D | password.c | 116 const char *h = ZSTR_VAL(hash); in php_password_bcrypt_valid() 161 if (ZSTR_LEN(hash) < 13) { in php_password_bcrypt_verify() 243 if (!hash || (ZSTR_LEN(hash) < sizeof("$argon2id$"))) { in extract_argon2_parameters() 526 if (!hash || ZSTR_LEN(hash) < 3) { in php_password_algo_extract_ident() 531 ident = ZSTR_VAL(hash) + 1; in php_password_algo_extract_ident() 558 zend_string *hash, *ident; in PHP_FUNCTION() local 562 Z_PARAM_STR(hash) in PHP_FUNCTION() 595 zend_string *hash; in PHP_FUNCTION() local 602 Z_PARAM_STR(hash) in PHP_FUNCTION() 627 zend_string *password, *hash; in PHP_FUNCTION() local [all …]
|
/PHP-8.3/Zend/ |
H A D | zend_string.h | 524 hash = hash * Z_L(33) + *str; in zend_inline_hash_func() 529 hash = ((hash << 5) + hash) + *str++; in zend_inline_hash_func() 530 hash = ((hash << 5) + hash) + *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() 539 case 7: hash = ((hash << 5) + hash) + *str++; /* fallthrough... */ in zend_inline_hash_func() [all …]
|
/PHP-8.3/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.3/ext/hash/ |
H A D | config.w32 | 3 ARG_WITH('mhash', 'mhash support (BC via hash)', 'no'); 11 EXTENSION('hash', 'hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c ' + 16 var hash_sha3_dir = 'ext/hash/sha3/generic' + (X64 ? '64' : '32') + 'lc'; 19 ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-opt64.c', 'hash'); 21 ADD_SOURCES(hash_sha3_dir, 'KeccakHash.c KeccakSponge.c KeccakP-1600-inplace32BI.c', 'hash'); 31 var hash_murmur_dir = 'ext/hash/murmur'; 35 ADD_SOURCES(hash_murmur_dir, 'PMurHash.c PMurHash128.c', 'hash'); 37 var hash_xxhash_dir = 'ext/hash/xxhash'; 42 PHP_INSTALL_HEADERS('ext/hash/', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
|
H A D | hash.c | 423 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 …]
|