Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 36) sorted by path

12

/php-src/ext/fileinfo/tests/
H A Dmagic658 #>>>&1 string >\0 \b, PASSWORD salt: "%-128.128s"
659 #>>>&1 regex/1l .* \b, Password salt: %s
661 #>>>>&1 regex/1l .* \b, Master salt: %s
16981 >>>>>>&28 ubequad x \b, salt %llu
24271 # mk-digest-salt[32]; salt parameter for master key PBKDF2
24272 >132 ubequad x \b, MK salt %#16.16llx
24316 # salt[64]; salt , unique for every header
24317 >104 ubequad x \b, salt %#llx...
24344 # salt parameter for PBKDF2
24345 #>8 ubequad x \b, salt %#16.16llx
[all …]
H A Dmagic私はガラスを食べられます658 #>>>&1 string >\0 \b, PASSWORD salt: "%-128.128s"
659 #>>>&1 regex/1l .* \b, Password salt: %s
661 #>>>>&1 regex/1l .* \b, Master salt: %s
16981 >>>>>>&28 ubequad x \b, salt %llu
24271 # mk-digest-salt[32]; salt parameter for master key PBKDF2
24272 >132 ubequad x \b, MK salt %#16.16llx
24316 # salt[64]; salt , unique for every header
24317 >104 ubequad x \b, salt %#llx...
24344 # salt parameter for PBKDF2
24345 #>8 ubequad x \b, salt %#16.16llx
[all …]
/php-src/ext/hash/
H A Dhash.c899 zend_string *returnval, *ikm, *algo, *info = NULL, *salt = NULL; in PHP_FUNCTION() local
907 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|lSS", &algo, &ikm, &length, &info, &salt) == FAILUR… in PHP_FUNCTION()
938 (unsigned char *) (salt ? ZSTR_VAL(salt) : ""), salt ? ZSTR_LEN(salt) : 0); in PHP_FUNCTION()
993 char *salt, *pass = NULL; in PHP_FUNCTION() local
1002 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|lbh", &algo, &pass, &pass_len, &salt, &salt_len, … in PHP_FUNCTION()
1057 memcpy(computed_salt, (unsigned char *) salt, salt_len); in PHP_FUNCTION()
1289 char *password, *salt; in PHP_FUNCTION() local
1293 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "lssl", &algorithm, &password, &password_len, &salt, &s… in PHP_FUNCTION()
1305 memcpy(padded_salt, salt, salt_len); in PHP_FUNCTION()
H A Dhash.stub.php86 function mhash_keygen_s2k(int $algo, string $password, string $salt, int $length): string|false {}
H A Dhash_arginfo.h73 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
90 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, salt, IS_STRING, 0, "\"\"")
109 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
/php-src/ext/hash/tests/
H A Dbug64745.phpt5 $hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0);
6 $rawHash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0, true);
H A Dhash_hkdf_rfc5869.phpt23 echo "Test case 3 (SHA-256 with zero-length salt, info): ",
47 echo "Test case 6 (SHA-1 with zero-length salt, info): ",
55 echo "Test case 7 (SHA-1 with zero-length info, salt not provided): ",
67 Test case 3 (SHA-256 with zero-length salt, info): 8da4e775a563c18f715f802a063c5a31b8a11f5c5ee1879e…
70 Test case 6 (SHA-1 with zero-length salt, info): 0ac1af7002b3d761d1e55298da9d0506b9ae52057220a306e0…
71 Test case 7 (SHA-1 with zero-length info, salt not provided): 2c91117204d745f3500d636a62f64f0ab3bae…
H A Dhash_pbkdf2_basic.phpt8 echo "sha1: " . hash_pbkdf2('sha1', 'password', 'salt', 1, 20)."\n";
9 echo "sha1(no length): " . hash_pbkdf2('sha1', 'password', 'salt', 1)."\n";
10 echo "sha1(raw): " . bin2hex(hash_pbkdf2('sha1', 'password', 'salt', 1, 20, TRUE))."\n";
13 echo "sha256: " . hash_pbkdf2('sha256', 'password', 'salt', 1, 20)."\n";
14 echo "sha256(no length): " . hash_pbkdf2('sha256', 'password', 'salt', 1)."\n";
15 echo "sha256(raw): " . bin2hex(hash_pbkdf2('sha256', 'password', 'salt', 1, 20, TRUE))."\n";
H A Dhash_pbkdf2_error.phpt6 /* Generate a PBKDF2 hash of the given password and salt
12 $salt = 'salt';
16 var_dump(hash_pbkdf2('foo', $password, $salt, 1));
25 var_dump(hash_pbkdf2('crc32', $password, $salt, 1));
33 var_dump(hash_pbkdf2('md5', $password, $salt, 0));
40 var_dump(hash_pbkdf2('md5', $password, $salt, -1));
48 var_dump(hash_pbkdf2('md5', $password, $salt, 1, -1));
H A Dmhash_003.phpt24 $salt = str_repeat($hash, 2);
25 $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100);
/php-src/ext/openssl/
H A Dopenssl.c5353 char *salt; in PHP_FUNCTION() local
5363 &salt, &salt_len, in PHP_FUNCTION()
5370 PHP_OPENSSL_CHECK_SIZE_T_TO_INT(salt_len, salt, 2); in PHP_FUNCTION()
5392 …if (PKCS5_PBKDF2_HMAC(password, (int)password_len, (unsigned char *)salt, (int)salt_len, (int)iter… in PHP_FUNCTION()
H A Dopenssl_arginfo.h156 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
/php-src/ext/openssl/tests/
H A Dopenssl_pbkdf2_basic.phpt10 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 1)));
11 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 2)));
12 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 4096)));
16 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 16777216)));
/php-src/ext/sodium/
H A Dlibsodium.c1416 unsigned char *salt; in PHP_FUNCTION() local
1430 &salt, &salt_len, in PHP_FUNCTION()
1483 passwd, (unsigned long long) passwd_len, salt, in PHP_FUNCTION()
1490 passwd, (unsigned long long) passwd_len, salt, in PHP_FUNCTION()
1606 unsigned char *salt; in PHP_FUNCTION() local
1617 &salt, &salt_len, in PHP_FUNCTION()
1650 passwd, (unsigned long long) passwd_len, salt, in PHP_FUNCTION()
3223 salt[0] = (unsigned char) (((uint64_t) subkey_id) ); in PHP_FUNCTION()
3224 salt[1] = (unsigned char) (((uint64_t) subkey_id) >> 8); in PHP_FUNCTION()
3231 memset(salt + 8, 0, (sizeof salt) - 8); in PHP_FUNCTION()
[all …]
H A Dlibsodium_arginfo.h295 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
329 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
/php-src/ext/sodium/tests/
H A Dpwhash_argon2i.phpt32 $salt = random_bytes(SODIUM_CRYPTO_PWHASH_SALTBYTES);
35 ($out_len, $passwd, $salt,
41 ($out_len, $passwd, $salt,
H A Dpwhash_scrypt.phpt24 $salt = random_bytes(SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES);
27 ($out_len, $passwd, $salt,
/php-src/ext/standard/
H A Dbasic_functions_arginfo.h603 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
H A Dconfig.m4140 char salt[15], answer[40];
143 salt[0]='$'; salt[1]='1'; salt[2]='$';
144 salt[3]='r'; salt[4]='a'; salt[5]='s';
145 salt[6]='m'; salt[7]='u'; salt[8]='s';
146 salt[9]='l'; salt[10]='e'; salt[11]='$';
147 salt[12]='\0';
148 strcpy(answer,salt);
181salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]…
183 strcpy(answer,salt);
217 strcpy(answer, salt);
[all …]
H A Dcrypt.c75 if (salt[0] == '*' && (salt[1] == '0' || salt[1] == '1')) { in php_crypt()
85 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') { in php_crypt()
93 } else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') { in php_crypt()
108 } else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') { in php_crypt()
124 salt[0] == '$' && in php_crypt()
125 salt[1] == '2' && in php_crypt()
126 salt[2] != 0 && in php_crypt()
148 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
178 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
201 salt[0] = salt[PHP_MAX_SALT_LEN] = '\0'; in PHP_FUNCTION()
[all …]
H A Dcrypt_blowfish.c647 BF_word salt[4]; in BF_crypt() member
680 BF_swap(data.binary.salt, 4); in BF_crypt()
689 L ^= data.binary.salt[i & 2]; in BF_crypt()
690 R ^= data.binary.salt[(i & 2) + 1]; in BF_crypt()
699 L ^= data.binary.salt[(BF_N + 2) & 3]; in BF_crypt()
700 R ^= data.binary.salt[(BF_N + 3) & 3]; in BF_crypt()
705 L ^= data.binary.salt[(BF_N + 4) & 3]; in BF_crypt()
727 tmp1 = data.binary.salt[0]; in BF_crypt()
728 tmp2 = data.binary.salt[1]; in BF_crypt()
729 tmp3 = data.binary.salt[2]; in BF_crypt()
[all …]
H A Dcrypt_freesec.c349 setup_salt(uint32_t salt, struct php_crypt_extended_data *data) in setup_salt() argument
354 if (salt == data->old_salt) in setup_salt()
356 data->old_salt = salt; in setup_salt()
362 if (salt & saltbit) in setup_salt()
574 des_cipher(const char *in, char *out, uint32_t salt, int count, in des_cipher() argument
580 setup_salt(salt, data); in des_cipher()
612 uint32_t count, salt, l, r0, r1, keybuf[2]; in _crypt_extended_r() local
646 for (i = 5, salt = 0; i < 9; i++) { in _crypt_extended_r()
650 salt |= value << (i - 5) * 6; in _crypt_extended_r()
684 salt = (ascii_to_bin(setting[1]) << 6) in _crypt_extended_r()
[all …]
H A Dcrypt_sha256.c347 salt += sizeof(sha256_salt_prefix) - 1; in php_sha256_crypt_r()
355 salt = endp + 1; in php_sha256_crypt_r()
365 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX); in php_sha256_crypt_r()
380 if ((uintptr_t)salt % __alignof__(uint32_t) != 0) { in php_sha256_crypt_r()
382 salt = copied_salt = in php_sha256_crypt_r()
396 sha256_process_bytes(salt, salt_len, &ctx); in php_sha256_crypt_r()
407 sha256_process_bytes(salt, salt_len, &alt_ctx); in php_sha256_crypt_r()
459 sha256_process_bytes(salt, salt_len, &alt_ctx); in php_sha256_crypt_r()
602 + (int)strlen(salt) + 1 + 43 + 1); in php_sha256_crypt()
614 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()
[all …]
H A Dcrypt_sha512.c384 salt += sizeof(sha512_salt_prefix) - 1; in php_sha512_crypt_r()
393 salt = endp + 1; in php_sha512_crypt_r()
403 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX); in php_sha512_crypt_r()
419 if ((uintptr_t)salt % __alignof__ (uint64_t) != 0) { in php_sha512_crypt_r()
421salt = copied_salt = memcpy(tmp_salt + __alignof__(uint64_t) - (uintptr_t)tmp_salt % __alignof__(u… in php_sha512_crypt_r()
434 sha512_process_bytes(salt, salt_len, &ctx); in php_sha512_crypt_r()
445 sha512_process_bytes(salt, salt_len, &alt_ctx); in php_sha512_crypt_r()
498 sha512_process_bytes(salt, salt_len, &alt_ctx); in php_sha512_crypt_r()
644 php_sha512_crypt(const char *key, const char *salt) { in php_sha512_crypt() argument
653 + strlen(salt) + 1 + 86 + 1); in php_sha512_crypt()
[all …]
H A Dpassword.c180 zend_string *result, *hash, *salt; in php_password_bcrypt_hash() local
202 ZSTR_VAL(salt)[ZSTR_LEN(salt)] = 0; in php_password_bcrypt_hash() local
204 hash = zend_string_alloc(ZSTR_LEN(salt) + hash_format_len, 0); in php_password_bcrypt_hash()
205 sprintf(ZSTR_VAL(hash), "%s%s", hash_format, ZSTR_VAL(salt)); in php_password_bcrypt_hash()
206 ZSTR_VAL(hash)[hash_format_len + ZSTR_LEN(salt)] = 0; in php_password_bcrypt_hash()
208 zend_string_release_ex(salt, 0); in php_password_bcrypt_hash()
305 zend_string *salt, *out, *encoded; in php_password_argon2_hash() local
348 (uint32_t)ZSTR_LEN(salt), in php_password_argon2_hash()
360 ZSTR_VAL(salt), in php_password_argon2_hash()
361 ZSTR_LEN(salt), in php_password_argon2_hash()
[all …]

Completed in 261 milliseconds

12