Home
last modified time | relevance | path

Searched refs:seed (Results 1 – 25 of 31) sorted by relevance

12

/PHP-8.1/ext/hash/tests/
H A Dmurmurhash3_seed.phpt2 Hash: MurmurHash3 seed
6 $ctx = hash_init("murmur3f", options: ["seed" => 42]);
16 $h0 = hash("murmur3f", "Two hashes meet in a bar.", options: ["seed" => 42]);
19 $ctx = hash_init("murmur3c", options: ["seed" => 106]);
29 $h0 = hash("murmur3c", "Two hashes meet in a bar.", options: ["seed" => 106]);
32 $ctx = hash_init("murmur3a", options: ["seed" => 2345]);
42 $h0 = hash("murmur3a", "Two hashes meet in a bar.", options: ["seed" => 2345]);
H A Dxxhash_seed.phpt2 Hash: xxHash seed
8 $ctx = hash_init($a, options: ["seed" => 42]);
16 …$h0 = hash($a, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", options: ["seed" => 42]…
H A Dxxhash_secret.phpt19 $ctx = hash_init($a, options: ["seed" => 24, "secret" => $secret]);
50 string(67) "xxh3: Only one of seed or secret is to be passed for initialization"
54 string(69) "xxh128: Only one of seed or secret is to be passed for initialization"
H A Dhash_file_basic1.phpt46 echo "murmur3a: " . hash_file('murmur3a', $file, false, ['seed' => 1234]). "\n";
48 echo "murmur3c: " . hash_file('murmur3c', $file, false, ['seed' => 1234]). "\n";
50 echo "murmur3f: " . hash_file('murmur3f', $file, false, ['seed' => 1234]). "\n";
/PHP-8.1/ext/hash/
H A Dhash_murmur.c42 zval *seed = zend_hash_str_find_deref(args, "seed", sizeof("seed") - 1); in PHP_MURMUR3AInit() local
45 if (seed && IS_LONG == Z_TYPE_P(seed)) { in PHP_MURMUR3AInit()
46 ctx->h = (uint32_t)Z_LVAL_P(seed); in PHP_MURMUR3AInit()
99 zval *seed = zend_hash_str_find_deref(args, "seed", sizeof("seed") - 1); in PHP_MURMUR3CInit() local
102 if (seed && IS_LONG == Z_TYPE_P(seed)) { in PHP_MURMUR3CInit()
103 uint32_t _seed = (uint32_t)Z_LVAL_P(seed); in PHP_MURMUR3CInit()
173 zval *seed = zend_hash_str_find_deref(args, "seed", sizeof("seed") - 1); in PHP_MURMUR3FInit() local
176 if (seed && IS_LONG == Z_TYPE_P(seed)) { in PHP_MURMUR3FInit()
177 uint64_t _seed = (uint64_t)Z_LVAL_P(seed); in PHP_MURMUR3FInit()
H A Dhash_xxhash.c46 zval *seed = zend_hash_str_find_deref(args, "seed", sizeof("seed") - 1); in PHP_XXH32Init() local
49 if (seed && IS_LONG == Z_TYPE_P(seed)) { in PHP_XXH32Init()
50 XXH32_reset(&ctx->s, (XXH32_hash_t)Z_LVAL_P(seed)); in PHP_XXH32Init()
110 zval *seed = zend_hash_str_find_deref(args, "seed", sizeof("seed") - 1); in PHP_XXH64Init() local
113 if (seed && IS_LONG == Z_TYPE_P(seed)) { in PHP_XXH64Init()
114 XXH64_reset(&ctx->s, (XXH64_hash_t)Z_LVAL_P(seed)); in PHP_XXH64Init()
/PHP-8.1/ext/standard/
H A Duniqid.c76 double seed; in PHP_FUNCTION() local
78 seed = php_combined_lcg() * 10; in PHP_FUNCTION()
80 seed = ((double) bytes / UINT32_MAX) * 10.0; in PHP_FUNCTION()
82 uniqid = strpprintf(0, "%s%08x%05x%.8F", prefix, sec, usec, seed); in PHP_FUNCTION()
H A Dmt_rand.c96 static inline void php_mt_initialize(uint32_t seed, uint32_t *state) in php_mt_initialize() argument
107 *s++ = seed & 0xffffffffU; in php_mt_initialize()
145 PHPAPI void php_mt_srand(uint32_t seed) in php_mt_srand() argument
148 php_mt_initialize(seed, BG(state)); in php_mt_srand()
188 zend_long seed = 0; in PHP_FUNCTION() local
193 Z_PARAM_LONG(seed) in PHP_FUNCTION()
198 if (php_random_bytes_silent(&seed, sizeof(zend_long)) == FAILURE) { in PHP_FUNCTION()
199 seed = GENERATE_SEED(); in PHP_FUNCTION()
211 php_mt_srand(seed); in PHP_FUNCTION()
H A Drand.c30 PHPAPI void php_srand(zend_long seed) in php_srand() argument
32 php_mt_srand(seed); in php_srand()
H A Dphp_mt_rand.h33 PHPAPI void php_mt_srand(uint32_t seed);
H A Dphp_rand.h69 PHPAPI void php_srand(zend_long seed);
/PHP-8.1/ext/hash/xxhash/
H A Dxxhash.h674 XXH64_hash_t seed; member
1437 state.v3 = seed + 0; in XXH32_reset()
1978 state.v3 = seed + 0; in XXH64_reset()
2791 seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; in XXH3_len_4to8_64b()
3814 if (seed == 0) in XXH3_hashLong_64b_withSeed_internal()
3990 statePtr->seed = seed; in XXH3_64bits_reset_internal()
4020 if (seed != statePtr->seed) XXH3_initCustomSecret(statePtr->customSecret, seed); in XXH3_64bits_reset_withSeed()
4177 if (state->seed) in XXH3_64bits_digest()
4281 seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32; in XXH3_len_4to8_128b()
4666 if (seed != statePtr->seed) XXH3_initCustomSecret(statePtr->customSecret, seed); in XXH3_128bits_reset_withSeed()
[all …]
/PHP-8.1/ext/hash/murmur/
H A DPMurHash128.h33 void PMurHash128x64(const void * key, const int len, uint32_t seed, void * out);
38 void PMurHash128x86(const void * key, const int len, uint32_t seed, void * out);
H A DPMurHash128.c427 void PMurHash128x86(const void * key, const int len, uint32_t seed, void * out) in PMurHash128x86() argument
430 uint32_t h[4] = {seed, seed, seed, seed}; in PMurHash128x86()
634 void PMurHash128x64(const void * key, const int len, uint32_t seed, void * out) in PMurHash128x64() argument
637 uint64_t h[2] = {seed, seed}; in PMurHash128x64()
/PHP-8.1/ext/gmp/tests/
H A Dgmp_random_seed.phpt82 $seed = gmp_init(1);
83 $seed <<= 512;
86 var_dump(gmp_random_seed($seed * -1));
98 var_dump(gmp_random_seed($seed));
176 gmp_random_seed(): Argument #1 ($seed) is not an integer string
/PHP-8.1/ext/standard/tests/general_functions/
H A Drand.phpt46 srand(): Argument #1 ($seed) must be passed explicitly, because the default value is not known
49 mt_srand(): Argument #1 ($seed) must be passed explicitly, because the default value is not known
/PHP-8.1/ext/sodium/tests/
H A Dcrypto_sign.phpt30 $seed = str_repeat('x', SODIUM_CRYPTO_SIGN_SEEDBYTES);
31 $alice_kp = sodium_crypto_sign_seed_keypair($seed);
38 "since they are derived from a fixed seed";
/PHP-8.1/ext/sodium/
H A Dlibsodium.stub.php45 function sodium_crypto_box_seed_keypair(string $seed): string {} argument
95 function sodium_crypto_kx_seed_keypair(string $seed): string {} argument
192 function sodium_crypto_sign_seed_keypair(string $seed): string {} argument
H A Dlibsodium.c809 unsigned char *seed; in PHP_FUNCTION() local
814 &seed, &seed_len) == FAILURE) { in PHP_FUNCTION()
827 seed) != 0) { in PHP_FUNCTION()
1129 unsigned char *seed; in PHP_FUNCTION() local
1134 &seed, &seed_len) == FAILURE) { in PHP_FUNCTION()
1147 seed) != 0) { in PHP_FUNCTION()
2628 unsigned char *seed; in PHP_FUNCTION() local
2633 &seed, &seed_len) == FAILURE) { in PHP_FUNCTION()
2647 seed, crypto_kx_SEEDBYTES, NULL, 0); in PHP_FUNCTION()
/PHP-8.1/ext/gd/libgd/
H A Dgd_filter.c36 s.seed = GD_SCATTER_SEED(); in gdImageScatter()
48 s.seed = GD_SCATTER_SEED(); in gdImageScatterColor()
67 (void)srand(scatter->seed); in gdImageScatterEx()
/PHP-8.1/ext/gmp/
H A Dgmp.c1732 zval *seed; in ZEND_FUNCTION() local
1735 if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &seed) == FAILURE) { in ZEND_FUNCTION()
1741 if (Z_TYPE_P(seed) == IS_LONG && Z_LVAL_P(seed) >= 0) { in ZEND_FUNCTION()
1742 gmp_randseed_ui(GMPG(rand_state), Z_LVAL_P(seed)); in ZEND_FUNCTION()
1747 FETCH_GMP_ZVAL(gmpnum_seed, seed, temp_a, 1); in ZEND_FUNCTION()
H A Dgmp.stub.php99 function gmp_random_seed(GMP|int|string $seed): void {} argument
H A Dgmp_arginfo.h133 ZEND_ARG_OBJ_TYPE_MASK(0, seed, GMP, MAY_BE_LONG|MAY_BE_STRING, NULL)
/PHP-8.1/sapi/fuzzer/
H A DREADME.md31 Some fuzzers have a seed corpus in `sapi/fuzzer/corpus`. You can use it as follows:
/PHP-8.1/
H A DUPGRADING264 … The initial hash state can be passed through the `seed` key in the `$options` array, for example:
267 $h = hash("murmur3f", $data, options: ["seed" => 42]);
271 …A valid seed value is within the range from 0 to the platform defined UINT_MAX, usually 4294967295.
280 … The initial hash state can be passed through the `seed` key in the `$options` array, for example:
283 $h = hash("xxh3", $data, options: ["seed" => 42]);

Completed in 80 milliseconds

12