Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 36) sorted by last modified time

12

/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/standard/
H A Dbasic_functions_arginfo.h603 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
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 …]
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_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 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 Dphp_crypt.h22 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_…
H A Dphp_crypt_r.c101 char * php_md5_crypt_r(const char *pw, const char *salt, char *out) in php_md5_crypt_r() argument
114 sp = salt; in php_md5_crypt_r()
/php-src/ext/hash/
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)
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()
/php-src/ext/sodium/
H A Dlibsodium_arginfo.h295 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
329 ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
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 …]
/php-src/ext/standard/tests/password/
H A Dpassword_removed_salt_option.phpt2 Test removed support for explicit salt option
10 var_dump(strlen(password_hash("rasmuslerdorf", PASSWORD_BCRYPT, array("cost" => 7, "salt" => "useso…
12 var_dump(strlen(password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . ch…
17 Warning: password_hash(): The "salt" option has been ignored, since providing a custom salt is no l…
20 Warning: password_hash(): The "salt" option has been ignored, since providing a custom salt is no l…
/php-src/ext/fileinfo/tests/
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 …]
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 …]
/php-src/ext/standard/tests/crypt/
H A Dbcrypt_salt_dollar.phpt6 $salt = '$2y$04$' . str_repeat('0', $i) . '$';
7 $result = crypt("foo", $salt);
8 var_dump($salt);
10 var_dump($result === $salt);
/php-src/ext/standard/tests/strings/
H A Dcrypt_blowfish_variation1.phpt14 foreach($salts as $i=>$salt) {
15 $crypt = crypt('U*U', $salt);
H A Dcrypt_sha256.phpt34 'we have a short salt string but not a short password',
H A Dcrypt_sha512.phpt29 'we have a short salt string but not a short password',
H A Dcrypt_variation1.phpt2 crypt() function - long salt
H A Dbug50052.phpt5 $salt = '$1$f+uslYF01$';
7 echo $salt . "\n";
8 echo crypt($password,$salt) . "\n";

Completed in 248 milliseconds

12