Home
last modified time | relevance | path

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

123456

/PHP-5.4/ext/hash/tests/
H A Dhash_error.phpt2 Test hash() function : error conditions
4 <?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
10 * Source code: ext/hash/hash.c
13 echo "*** Testing hash() : error conditions ***\n";
16 var_dump(hash());
17 var_dump(hash('adler32'));
21 var_dump(hash('adler32', '', false, $extra_arg));
23 echo "\n-- Testing hash() function with invalid hash algorithm --\n";
24 var_dump(hash('foo', ''));
29 *** Testing hash() : error conditions ***
[all …]
H A Dcrc32.phpt4 <?php extension_loaded('hash') or die('skip'); ?>
7 echo hash('crc32', ''), "\n";
8 echo hash('crc32', 'a'), "\n";
9 echo hash('crc32', 'abc'), "\n";
10 echo hash('crc32', 'message digest'), "\n";
11 echo hash('crc32', 'abcdefghijklmnopqrstuvwxyz'), "\n";
14 echo hash('crc32b', ''), "\n";
15 echo hash('crc32b', 'a'), "\n";
16 echo hash('crc32b', 'abc'), "\n";
17 echo hash('crc32b', 'message digest'), "\n";
[all …]
H A Dripemd128.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('ripemd128', '') . "\n";
8 echo hash('ripemd128', 'a') . "\n";
9 echo hash('ripemd128', 'abc') . "\n";
10 echo hash('ripemd128', 'message digest') . "\n";
11 echo hash('ripemd128', 'abcdefghijklmnopqrstuvwxyz') . "\n";
12 echo hash('ripemd128', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
13 echo hash('ripemd128', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
14 echo hash('ripemd128', '123456789012345678901234567890123456789012345678901234567890123456789012345…
15 echo hash('ripemd128', str_repeat('a', 1000000)) . "\n";
H A Dripemd160.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('ripemd160', '') . "\n";
8 echo hash('ripemd160', 'a') . "\n";
9 echo hash('ripemd160', 'abc') . "\n";
10 echo hash('ripemd160', 'message digest') . "\n";
11 echo hash('ripemd160', 'abcdefghijklmnopqrstuvwxyz') . "\n";
12 echo hash('ripemd160', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
13 echo hash('ripemd160', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
14 echo hash('ripemd160', '123456789012345678901234567890123456789012345678901234567890123456789012345…
15 echo hash('ripemd160', str_repeat('a', 1000000)) . "\n";
H A Dripemd256.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('ripemd256', '') . "\n";
8 echo hash('ripemd256', 'a') . "\n";
9 echo hash('ripemd256', 'abc') . "\n";
10 echo hash('ripemd256', 'message digest') . "\n";
11 echo hash('ripemd256', 'abcdefghijklmnopqrstuvwxyz') . "\n";
12 echo hash('ripemd256', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
13 echo hash('ripemd256', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
14 echo hash('ripemd256', '123456789012345678901234567890123456789012345678901234567890123456789012345…
15 echo hash('ripemd256', str_repeat('a', 1000000)) . "\n";
H A Dripemd320.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('ripemd320', '') . "\n";
8 echo hash('ripemd320', 'a') . "\n";
9 echo hash('ripemd320', 'abc') . "\n";
10 echo hash('ripemd320', 'message digest') . "\n";
11 echo hash('ripemd320', 'abcdefghijklmnopqrstuvwxyz') . "\n";
12 echo hash('ripemd320', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
13 echo hash('ripemd320', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
14 echo hash('ripemd320', '123456789012345678901234567890123456789012345678901234567890123456789012345…
15 echo hash('ripemd320', str_repeat('a', 1000000)) . "\n";
H A Dadler32.phpt4 <?php extension_loaded('hash') or die('skip'); ?>
7 echo hash('adler32', ''), "\n";
8 echo hash('adler32', 'a'), "\n";
9 echo hash('adler32', 'abc'), "\n";
10 echo hash('adler32', 'message digest'), "\n";
11 echo hash('adler32', 'abcdefghijklmnopqrstuvwxyz'), "\n";
12 echo hash('adler32', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), "\n";
13 echo hash('adler32', '12345678901234567890123456789012345678901234567890123456789012345678901234567…
H A Dmd2.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('md2', '') . "\n";
8 echo hash('md2', 'a') . "\n";
9 echo hash('md2', 'abc') . "\n";
10 echo hash('md2', 'message digest') . "\n";
11 echo hash('md2', 'abcdefghijklmnopqrstuvwxyz') . "\n";
12 echo hash('md2', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
13 echo hash('md2', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'…
H A Dmd4.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
8 echo hash('md4', '') . "\n";
9 echo hash('md4', 'a') . "\n";
10 echo hash('md4', 'abc') . "\n";
11 echo hash('md4', 'message digest') . "\n";
12 echo hash('md4', 'abcdefghijklmnopqrstuvwxyz') . "\n";
13 echo hash('md4', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n";
14 echo hash('md4', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'…
H A Dsha384.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('sha384', '') . "\n";
8 echo hash('sha384', 'a') . "\n";
9 echo hash('sha384', '012345678901234567890123456789012345678901234567890123456789') . "\n";
12 echo hash('sha384', 'abc') . "\n";
13 echo hash('sha384', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmno…
14 echo hash('sha384', str_repeat('a', 1000000)) . "\n";
H A Dsha512.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('sha512', '') . "\n";
8 echo hash('sha512', 'a') . "\n";
9 echo hash('sha512', '012345678901234567890123456789012345678901234567890123456789') . "\n";
12 echo hash('sha512', 'abc') . "\n";
13 echo hash('sha512', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmno…
14 echo hash('sha512', str_repeat('a', 1000000)) . "\n";
H A Dsha1.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('sha1', '') . "\n";
8 echo hash('sha1', 'a') . "\n";
9 echo hash('sha1', '012345678901234567890123456789012345678901234567890123456789') . "\n";
12 echo hash('sha1', 'abc') . "\n";
13 echo hash('sha1', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
14 echo hash('sha1', str_repeat('a', 1000000)) . "\n";
H A Dsha224.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('sha224', '') . "\n";
8 echo hash('sha224', 'a') . "\n";
9 echo hash('sha224', '012345678901234567890123456789012345678901234567890123456789') . "\n";
12 echo hash('sha224', 'abc') . "\n";
13 echo hash('sha224', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
14 echo hash('sha224', str_repeat('a', 1000000)) . "\n";
H A Dsha256.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('sha256', '') . "\n";
8 echo hash('sha256', 'a') . "\n";
9 echo hash('sha256', '012345678901234567890123456789012345678901234567890123456789') . "\n";
12 echo hash('sha256', 'abc') . "\n";
13 echo hash('sha256', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
14 echo hash('sha256', str_repeat('a', 1000000)) . "\n";
H A Dgost.phpt4 <?php extension_loaded('hash') or die('skip'); ?>
7 echo hash('gost', ''), "\n";
8 echo hash('gost', 'The quick brown fox jumps over the lazy dog'), "\n";
9 echo hash('gost', 'The quick brown fox jumps over the lazy cog'), "\n";
10 echo hash('gost', str_repeat('a', 31)), "\n";
11 echo hash('gost', str_repeat('a', 32)), "\n";
12 echo hash('gost', str_repeat('a', 33)), "\n";
H A Dtiger.phpt4 <?php extension_loaded('hash') or die('skip'); ?>
7 echo hash('tiger192,3', ''),"\n";
8 echo hash('tiger192,3', 'abc'),"\n";
9 echo hash('tiger192,3', str_repeat('a', 63)),"\n";
10 echo hash('tiger192,3', str_repeat('abc', 61)),"\n";
11 echo hash('tiger192,3', str_repeat('abc', 64)),"\n";
H A Dbug70312.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 var_dump(hash('haval128,5', '1234567890123456789012345678901234567890123456789012345678901234'));
8 var_dump(hash('haval160,5', '1234567890123456789012345678901234567890123456789012345678901234'));
9 var_dump(hash('haval192,5', '1234567890123456789012345678901234567890123456789012345678901234'));
10 var_dump(hash('haval224,5', '1234567890123456789012345678901234567890123456789012345678901234'));
11 var_dump(hash('haval256,5', '1234567890123456789012345678901234567890123456789012345678901234'));
H A Dsnefru.phpt4 <?php extension_loaded('hash') or die('skip'); ?>
7 echo hash('snefru', ''), "\n";
8 echo hash('snefru', 'The quick brown fox jumps over the lazy dog'), "\n";
9 echo hash('snefru', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), "\n";
10 echo hash('snefru', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), "\n";
11 echo hash('snefru', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'), "\n";
H A Dmhash_003.phpt24 foreach ($supported_hash_al as $hash=>$wanted) {
25 $passwd = str_repeat($hash, 10);
26 $salt = str_repeat($hash, 2);
27 $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100);
29 echo "$hash\nok\n";
31 echo "$hash: ";
33 echo "$hash: ";
H A Dmd5.phpt4 <?php if(!extension_loaded("hash")) print "skip"; ?>
7 echo hash('md5', '') . "\n";
8 echo hash('md5', 'a') . "\n";
9 echo hash('md5', '012345678901234567890123456789012345678901234567890123456789') . "\n";
10 echo hash('md5', str_repeat('a', 1000000)) . "\n";
/PHP-5.4/ext/hash/
H A Dhash.c191 PHP_FUNCTION(hash) in PHP_FUNCTION() argument
355 hash->ops = ops; in PHP_FUNCTION()
508 hash->ops->hash_init(hash->context); in PHP_FUNCTION()
509 hash->ops->hash_update(hash->context, (unsigned char *) hash->key, hash->ops->block_size); in PHP_FUNCTION()
510 hash->ops->hash_update(hash->context, (unsigned char *) digest, hash->ops->digest_size); in PHP_FUNCTION()
514 memset(hash->key, 0, hash->ops->block_size); in PHP_FUNCTION()
562 res = hash->ops->hash_copy(hash->ops, hash->context, context); in PHP_FUNCTION()
574 memcpy(copy_hash->key, hash->key, hash->ops->block_size); in PHP_FUNCTION()
608 hash->ops->hash_final(dummy, hash->context); in php_hash_dtor()
614 memset(hash->key, 0, hash->ops->block_size); in php_hash_dtor()
[all …]
H A Dconfig.m42 dnl config.m4 for extension hash
7 PHP_ARG_ENABLE(hash, whether to enable hash support,
8 [ --disable-hash Disable hash support], yes)
28 EXT_HASH_SOURCES="hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c \
36 PHP_NEW_EXTENSION(hash, $EXT_HASH_SOURCES, $ext_shared)
38 PHP_INSTALL_HEADERS(ext/hash, $EXT_HASH_HEADERS)
/PHP-5.4/Zend/
H A Dzend_hash.h267 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
268 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
269 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
270 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
271 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
272 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
273 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
274 hash = ((hash << 5) + hash) + *arKey++; in zend_inline_hash_func()
277 case 7: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */ in zend_inline_hash_func()
278 case 6: hash = ((hash << 5) + hash) + *arKey++; /* fallthrough... */ in zend_inline_hash_func()
[all …]
/PHP-5.4/ext/phar/tests/
H A Dphar_setsignaturealgo2.phpt2 Phar::setSupportedSignatures() with hash
6 if (!extension_loaded("hash")) die("skip hash extension required");
9 if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared");
55 ["hash"]=>
61 ["hash"]=>
67 ["hash"]=>
73 ["hash"]=>
79 ["hash"]=>
85 ["hash"]=>
/PHP-5.4/ext/intl/collator/
H A Dcollator_convert.c55 zend_hash_get_current_data( hash, (void**) &hashData ); in collator_convert_hash_item_from_utf8_to_utf16()
75 zend_hash_update( hash, hashKey, strlen( hashKey ) + 1, in collator_convert_hash_item_from_utf8_to_utf16()
80 zend_hash_index_update( hash, hashIndex, in collator_convert_hash_item_from_utf8_to_utf16()
99 zend_hash_get_current_data( hash, (void**) &hashData ); in collator_convert_hash_item_from_utf16_to_utf8()
125 zend_hash_index_update( hash, hashIndex, in collator_convert_hash_item_from_utf16_to_utf8()
140 zend_hash_internal_pointer_reset( hash ); in collator_convert_hash_from_utf8_to_utf16()
146 hash, hashKeyType, hashKey, hashIndex, status ); in collator_convert_hash_from_utf8_to_utf16()
151 zend_hash_move_forward( hash ); in collator_convert_hash_from_utf8_to_utf16()
165 zend_hash_internal_pointer_reset( hash ); in collator_convert_hash_from_utf16_to_utf8()
171 hash, hashKeyType, hashKey, hashIndex, status ); in collator_convert_hash_from_utf16_to_utf8()
[all …]

Completed in 70 milliseconds

123456