Home
last modified time | relevance | path

Searched refs:algo (Results 1 – 25 of 61) sorted by relevance

123

/PHP-8.3/ext/hash/
H A Dhash.stub.php12 function hash(string $algo, string $data, bool $binary = false, array $options = []): string {} argument
15 function hash_file(string $algo, string $filename, bool $binary = false, array $options = []): stri… argument
20 function hash_hmac(string $algo, string $data, #[\SensitiveParameter] string $key, bool $binary = f… argument
25 function hash_hmac_file(string $algo, string $filename, #[\SensitiveParameter] string $key, bool $b… argument
30 function hash_init(string $algo, int $flags = 0, #[\SensitiveParameter] string $key = "", array $op… argument
63 function hash_pbkdf2(string $algo, #[\SensitiveParameter] string $password, string $salt, int $iter…
70 function hash_hkdf(string $algo, #[\SensitiveParameter] string $key, int $length = 0, string $info …
74 function mhash_get_block_size(int $algo): int|false {}
80 function mhash_get_hash_name(int $algo): string|false {}
86 function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {}
[all …]
H A Dbench.php8 foreach (hash_algos() as $algo) {
9 $time[$algo] = 0;
13 foreach (hash_algos() as $algo) {
16 hash($algo, $data);
18 $time[$algo] += hrtime(true)-$start;
H A Dhash_arginfo.h5 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
12 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
19 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
26 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
33 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
71 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
86 ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
95 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
101 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
107 ZEND_ARG_TYPE_INFO(0, algo, IS_LONG, 0)
[all …]
H A Dhash.c118 size_t algo_len = strlen(algo); in php_hash_register_algo()
367 ops = php_hash_fetch_ops(algo); in php_hash_do_hash()
425 zend_string *algo; in PHP_FUNCTION() local
432 Z_PARAM_STR(algo) in PHP_FUNCTION()
447 zend_string *algo; in PHP_FUNCTION() local
454 Z_PARAM_STR(algo) in PHP_FUNCTION()
582 zend_string *algo; in PHP_FUNCTION() local
599 zend_string *algo; in PHP_FUNCTION() local
1203 zend_string *algo = NULL; in PHP_FUNCTION() local
1229 if (algo) { in PHP_FUNCTION()
[all …]
/PHP-8.3/ext/sockets/tests/
H A Dsocket_tcp_congestion.phpt14 $algo = 'cubic';
16 $algo = 'newreno';
21 echo "current tcp congestion algo " . $r['name'] . "\n";
22 var_dump(socket_set_option($socket, SOL_TCP, TCP_CONGESTION, $algo));
24 echo "new tcp congestion algo " . $r['name'];
27 current tcp congestion algo %s
29 new tcp congestion algo %s
/PHP-8.3/sapi/fuzzer/
H A Dgenerate_unserializehash_corpus.php6 foreach (hash_algos() as $algo) {
7 $ctx = hash_init($algo);
8 $algx = preg_replace('/[^-_a-zA-Z0-9]/', '_', $algo);
12 echo "Hash algorithm $algo could not be serialized.\n";
/PHP-8.3/ext/hash/tests/
H A Dhaval.phpt8 $algo = sprintf('haval%d,%d',$bits,$pass);
9 echo $algo . ': ' . hash($algo,'') . "\n";
15 $algo = sprintf('haval%d,%d',$bits,$pass);
16 echo $algo . ': ' . hash($algo,'abc') . "\n";
22 $algo = sprintf('haval%d,%d',$bits,$pass);
23 …echo $algo . ': ' . hash($algo,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ0123456789abcde…
H A Dmhash_004.phpt8 $algo = MHASH_MD5;
9 var_dump($algo);
10 var_dump(bin2hex(mhash($algo, "test")));
11 var_dump($algo);
H A Dhash_hkdf_error.phpt51 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
54 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
55 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
56 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
57 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
58 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
59 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
60 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
61 [ValueError] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
H A Dhash_serialize_003.phpt230 function test_serialization($serial, $hash, $algo) {
236 echo "$algo: unexpected hash $hash2 for serialization {$serial}\n";
239 echo "$algo: problem with serialization {$serial}\n";
245 $algo = $slist[0];
246 $hash = hash($algo, "I can't remember anythingCan’t tell if this is true or dream");
248 $ctx = hash_init($algo);
252 echo "$algo: unexpected serialization $serial\n";
255 test_serialization($serial, $hash, $algo);
H A Dhash_hkdf_edges.phpt13 echo "Non-crypto algo name case-sensitivity:\n";
28 Non-crypto algo name case-sensitivity:
29 [Error] hash_hkdf(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
H A Dhash_serialize_001.phpt8 foreach ($algos as $algo) {
9 if (not_serializable($algo)) continue;
10 var_dump($algo);
11 $ctx0 = hash_init($algo);
26 foreach ($algos as $algo) {
27 if (not_serializable($algo)) continue;
28 var_dump($algo);
29 $orig = hash_init($algo);
33 $fresh = hash_init($algo);
42 function not_serializable(string $algo)
[all …]
H A Dhash_hmac_error.phpt35 hash_hmac(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
38 hash_hmac(): Argument #1 ($algo) must be a valid cryptographic hashing algorithm
/PHP-8.3/ext/standard/
H A Dpassword.c542 const php_password_algo *algo; in php_password_algo_identify_ex() local
551 return (!algo || (algo->valid && !algo->valid(hash))) ? default_algo : algo; in php_password_algo_identify_ex()
557 const php_password_algo *algo; in PHP_FUNCTION() local
570 if (!algo || (algo->valid && !algo->valid(hash))) { in PHP_FUNCTION()
584 if (algo->get_info) { in PHP_FUNCTION()
585 algo->get_info(&options, hash); in PHP_FUNCTION()
628 const php_password_algo *algo; in PHP_FUNCTION() local
636 RETURN_BOOL(algo && (!algo->verify || algo->verify(password, hash))); in PHP_FUNCTION()
647 const php_password_algo *algo; in PHP_FUNCTION() local
658 if (!algo) { in PHP_FUNCTION()
[all …]
H A Dphp_array.h34 PHPAPI bool php_array_data_shuffle(const php_random_algo *algo, php_random_status *status, zval *ar…
35 PHPAPI bool php_array_pick_keys(const php_random_algo *algo, php_random_status *status, zval *input…
/PHP-8.3/ext/random/
H A Drandomizer.c36 randomizer->algo = engine->algo; in randomizer_common_init()
54 randomizer->algo = &php_random_algo_user; in randomizer_common_init()
104 uint64_t r = randomizer->algo->generate(randomizer->status); in PHP_METHOD()
215 result = randomizer->algo->generate(randomizer->status); in PHP_METHOD()
246 randomizer->algo->range == php_random_algo_mt19937.range in PHP_METHOD()
258 result = randomizer->algo->range(randomizer->status, min, max); in PHP_METHOD()
289 uint64_t result = randomizer->algo->generate(randomizer->status); in PHP_METHOD()
318 if (!php_array_data_shuffle(randomizer->algo, randomizer->status, return_value)) { in PHP_METHOD()
358 randomizer->algo, in PHP_METHOD()
407 uint64_t offset = randomizer->algo->range(randomizer->status, 0, max_offset); in PHP_METHOD()
[all …]
H A Dgammasection.c74 PHPAPI double php_random_gammasection_closed_open(const php_random_algo *algo, php_random_status *s… in php_random_gammasection_closed_open() argument
83 uint64_t k = 1 + php_random_range64(algo, status, hi - 1); /* [1, hi] */ in php_random_gammasection_closed_open()
102 PHPAPI double php_random_gammasection_closed_closed(const php_random_algo *algo, php_random_status … in php_random_gammasection_closed_closed() argument
111 uint64_t k = php_random_range64(algo, status, hi); /* [0, hi] */ in php_random_gammasection_closed_closed()
134 PHPAPI double php_random_gammasection_open_closed(const php_random_algo *algo, php_random_status *s… in php_random_gammasection_open_closed() argument
143 uint64_t k = php_random_range64(algo, status, hi - 1); /* [0, hi - 1] */ in php_random_gammasection_open_closed()
162 PHPAPI double php_random_gammasection_open_open(const php_random_algo *algo, php_random_status *sta… in php_random_gammasection_open_open() argument
171 uint64_t k = 1 + php_random_range64(algo, status, hi - 2); /* [1, hi - 1] */ in php_random_gammasection_open_open()
H A Drandom.c85 uint32_t r = algo->generate(status); in php_random_range32()
120 uint32_t r = algo->generate(status); in php_random_range32()
141 uint64_t r = algo->generate(status); in php_random_range64()
176 uint64_t r = algo->generate(status); in php_random_range64()
232 status->last_generated_size = algo->generate_size; in php_random_status_alloc()
233 status->state = algo->state_size > 0 ? pecalloc(1, algo->state_size, persistent) : NULL; in php_random_status_alloc()
262 engine->algo = algo; in php_random_engine_common_init()
263 engine->status = php_random_status_alloc(engine->algo, false); in php_random_engine_common_init()
282 new_engine->algo = old_engine->algo; in php_random_engine_common_clone_object()
298 return (zend_long) (php_random_range64(algo, status, umax) + min); in php_random_range()
[all …]
H A Dphp_random.h267 const php_random_algo *algo; member
273 const php_random_algo *algo; member
307 PHPAPI php_random_status *php_random_status_alloc(const php_random_algo *algo, const bool persisten…
310 …ine_common_init(zend_class_entry *ce, zend_object_handlers *handlers, const php_random_algo *algo);
313 PHPAPI uint32_t php_random_range32(const php_random_algo *algo, php_random_status *status, uint32_t…
314 PHPAPI uint64_t php_random_range64(const php_random_algo *algo, php_random_status *status, uint64_t…
315 PHPAPI zend_long php_random_range(const php_random_algo *algo, php_random_status *status, zend_long…
331 PHPAPI double php_random_gammasection_closed_open(const php_random_algo *algo, php_random_status *s…
332 PHPAPI double php_random_gammasection_closed_closed(const php_random_algo *algo, php_random_status …
333 PHPAPI double php_random_gammasection_open_closed(const php_random_algo *algo, php_random_status *s…
[all …]
H A Dengine_mt19937.c283 engine->algo->seed(engine->status, seed); in PHP_METHOD()
297 generated = engine->algo->generate(engine->status); in PHP_METHOD()
332 if (!engine->algo->serialize(engine->status, Z_ARRVAL(t))) { in PHP_METHOD()
375 if (!engine->algo->unserialize(engine->status, Z_ARRVAL_P(t))) { in PHP_METHOD()
395 if (engine->algo->serialize) { in PHP_METHOD()
397 if (!engine->algo->serialize(engine->status, Z_ARRVAL(t))) { in PHP_METHOD()
/PHP-8.3/ext/standard/tests/password/
H A Dpassword_get_info.phpt19 ["algo"]=>
30 ["algo"]=>
41 ["algo"]=>
50 ["algo"]=>
H A Dpassword_hash_argon2.phpt20 foreach ($algos as $algo) {
21 $hash = password_hash($password, $algo);
23 var_dump(password_get_info($hash)['algo']);
H A Dpassword_hash.phpt15 foreach ($algos as $algo) {
16 $hash = password_hash("foo", $algo);
H A Dpassword_get_info_argon2.phpt17 ["algo"]=>
32 ["algo"]=>
/PHP-8.3/ext/sodium/tests/
H A Dphp_password_verify.phpt13 list(, $algo) = explode('$', $hash, 3);
15 if (!in_array($algo, password_algos(), true /* strict */)) {
16 echo "skip - No $algo support in password_verify()";

Completed in 92 milliseconds

123