Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 28) sorted by relevance

12

/PHP-5.5/ext/standard/
H A Dcrypt.c157 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') { in php_crypt()
166 } else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') { in php_crypt()
181 } else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') { in php_crypt()
200 salt[4] >= '0' && salt[4] <= '3' && in php_crypt()
201 salt[5] >= '0' && salt[5] <= '9' && in php_crypt()
221 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
242 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
262 salt[0] = salt[PHP_MAX_SALT_LEN] = '\0'; in PHP_FUNCTION()
277 if (!*salt) { in PHP_FUNCTION()
285 salt[2] = '\0'; in PHP_FUNCTION()
[all …]
H A Dconfig.m4122 char salt[15], answer[40];
124 salt[0]='$'; salt[1]='1'; salt[2]='$';
125 salt[3]='r'; salt[4]='a'; salt[5]='s';
126 salt[6]='m'; salt[7]='u'; salt[8]='s';
127 salt[9]='l'; salt[10]='e'; salt[11]='$';
128 salt[12]='\0';
129 strcpy(answer,salt);
157salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]…
159 strcpy(answer,salt);
188 strcpy(answer, salt);
[all …]
H A Dphp_crypt_r.h51 extern char * php_md5_crypt_r(const char *pw, const char *salt, char *out);
52 extern char * php_sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
53 extern char * php_sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
H A Dpassword.c310 char *hash_format, *hash, *salt, *password, *result; in PHP_FUNCTION() local
399 salt = safe_emalloc(required_salt_len, 1, 1); in PHP_FUNCTION()
403 efree(salt); in PHP_FUNCTION()
409 salt = safe_emalloc(required_salt_len, 1, 1); in PHP_FUNCTION()
410 memcpy(salt, buffer, (int) required_salt_len); in PHP_FUNCTION()
415 salt = safe_emalloc(required_salt_len, 1, 1); in PHP_FUNCTION()
416 if (php_password_make_salt(required_salt_len, salt TSRMLS_CC) == FAILURE) { in PHP_FUNCTION()
418 efree(salt); in PHP_FUNCTION()
424 salt[salt_len] = 0; in PHP_FUNCTION()
427 sprintf(hash, "%s%s", hash_format, salt); in PHP_FUNCTION()
[all …]
H A Dcrypt_sha256.c375 salt += sizeof(sha256_salt_prefix) - 1; in php_sha256_crypt_r()
383 salt = endp + 1; in php_sha256_crypt_r()
389 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX); in php_sha256_crypt_r()
397 if ((salt - (char *) 0) % __alignof__(uint32_t) != 0) { in php_sha256_crypt_r()
399 salt = copied_salt = in php_sha256_crypt_r()
413 sha256_process_bytes(salt, salt_len, &ctx); in php_sha256_crypt_r()
424 sha256_process_bytes(salt, salt_len, &alt_ctx); in php_sha256_crypt_r()
475 sha256_process_bytes(salt, salt_len, &alt_ctx); in php_sha256_crypt_r()
610 + strlen(salt) + 1 + 43 + 1); in php_sha256_crypt()
622 return php_sha256_crypt_r(key, salt, buffer, buflen); in php_sha256_crypt()
[all …]
H A Dcrypt_sha512.c408 salt += sizeof(sha512_salt_prefix) - 1; in php_sha512_crypt_r()
417 salt = endp + 1; in php_sha512_crypt_r()
423 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX); in php_sha512_crypt_r()
434salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) - (tmp - (char *) 0) % __alignof__(uint64_… in php_sha512_crypt_r()
447 sha512_process_bytes(salt, salt_len, &ctx); in php_sha512_crypt_r()
458 sha512_process_bytes(salt, salt_len, &alt_ctx); in php_sha512_crypt_r()
510 sha512_process_bytes(salt, salt_len, &alt_ctx); in php_sha512_crypt_r()
647 php_sha512_crypt(const char *key, const char *salt) { in php_sha512_crypt() argument
656 + strlen(salt) + 1 + 86 + 1); in php_sha512_crypt()
668 return php_sha512_crypt_r (key, salt, buffer, buflen); in php_sha512_crypt()
[all …]
H A Dcrypt_blowfish.c665 BF_word salt[4]; in BF_crypt() member
698 BF_swap(data.binary.salt, 4); in BF_crypt()
707 L ^= data.binary.salt[i & 2]; in BF_crypt()
708 R ^= data.binary.salt[(i & 2) + 1]; in BF_crypt()
717 L ^= data.binary.salt[(BF_N + 2) & 3]; in BF_crypt()
718 R ^= data.binary.salt[(BF_N + 3) & 3]; in BF_crypt()
723 L ^= data.binary.salt[(BF_N + 4) & 3]; in BF_crypt()
745 tmp1 = data.binary.salt[0]; in BF_crypt()
746 tmp2 = data.binary.salt[1]; in BF_crypt()
747 tmp3 = data.binary.salt[2]; in BF_crypt()
[all …]
H A Dcrypt_freesec.c357 setup_salt(uint32_t salt, struct php_crypt_extended_data *data) in setup_salt() argument
362 if (salt == data->old_salt) in setup_salt()
364 data->old_salt = salt; in setup_salt()
370 if (salt & saltbit) in setup_salt()
582 des_cipher(const char *in, char *out, uint32_t salt, int count, in des_cipher() argument
588 setup_salt(salt, data); in des_cipher()
620 uint32_t count, salt, l, r0, r1, keybuf[2]; in _crypt_extended_r() local
654 for (i = 5, salt = 0; i < 9; i++) { in _crypt_extended_r()
658 salt |= value << (i - 5) * 6; in _crypt_extended_r()
692 salt = (ascii_to_bin(setting[1]) << 6) in _crypt_extended_r()
[all …]
H A Dphp_crypt_r.c127 char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { in php_md5_crypt_r() argument
136 const char *sp = salt; in php_md5_crypt_r()
137 const char *ep = salt; in php_md5_crypt_r()
150 sp = salt; in php_md5_crypt_r()
319 char * php_md5_crypt_r(const char *pw, const char *salt, char *out) in php_md5_crypt_r() argument
332 sp = salt; in php_md5_crypt_r()
H A Dphp_crypt.h26 PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, char…
/PHP-5.5/ext/hash/tests/
H A Dhash_pbkdf2_error.phpt8 /* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int le…
9 Generate a PBKDF2 hash of the given password and salt
15 $salt = 'salt';
24 var_dump(@hash_pbkdf2('crc32', $password, $salt));
28 var_dump(@hash_pbkdf2('crc32', $password, $salt, 10, 10, true, 'extra arg'));
32 var_dump(@hash_pbkdf2('foo', $password, $salt, 1));
36 var_dump(@hash_pbkdf2('md5', $password, $salt, 0));
38 var_dump(@hash_pbkdf2('md5', $password, $salt, -1));
42 var_dump(@hash_pbkdf2('md5', $password, $salt, 1, -1));
H A Dhash_pbkdf2_basic.phpt16 echo "sha1: " . hash_pbkdf2('sha1', 'password', 'salt', 1, 20)."\n";
17 echo "sha1(no length): " . hash_pbkdf2('sha1', 'password', 'salt', 1)."\n";
18 echo "sha1(raw): " . bin2hex(hash_pbkdf2('sha1', 'password', 'salt', 1, 20, TRUE))."\n";
21 echo "sha256: " . hash_pbkdf2('sha256', 'password', 'salt', 1, 20)."\n";
22 echo "sha256(no length): " . hash_pbkdf2('sha256', 'password', 'salt', 1)."\n";
23 echo "sha256(raw): " . bin2hex(hash_pbkdf2('sha256', 'password', 'salt', 1, 20, TRUE))."\n";
H A Dbug64745.phpt7 $hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0);
8 $rawHash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0, true);
H A Dmhash_003.phpt26 $salt = str_repeat($hash, 2);
27 $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100);
/PHP-5.5/ext/standard/tests/password/
H A Dpassword_bcrypt_errors.phpt11 var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => "foo")));
13 var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => "123456789012345678901")));
15 var_dump(password_hash("foo", PASSWORD_BCRYPT, array("salt" => 123)));
27 Warning: password_hash(): Provided salt is too short: 3 expecting 22 in %s on line %d
30 Warning: password_hash(): Provided salt is too short: 21 expecting 22 in %s on line %d
33 Warning: password_hash(): Provided salt is too short: 3 expecting 22 in %s on line %d
H A Dpassword_hash_error.phpt19 var_dump(password_hash("123", PASSWORD_BCRYPT, array("salt" => array())));
21 /* Non-string salt, checking for memory leaks */
22 var_dump(password_hash('123', PASSWORD_BCRYPT, array('salt' => 1234)));
44 Warning: password_hash(): Non-string salt parameter supplied in %s on line %d
47 Warning: password_hash(): Provided salt is too short: 4 expecting 22 in %s on line %d
H A Dpassword_hash.phpt13 var_dump(password_hash("rasmuslerdorf", PASSWORD_BCRYPT, array("cost" => 7, "salt" => "usesomesilly…
15 var_dump(password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0))));
/PHP-5.5/ext/openssl/tests/
H A Dopenssl_pbkdf2.phpt8 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 1)));
9 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 2)));
10 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 4096)));
14 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 16777216)));
/PHP-5.5/ext/standard/tests/strings/
H A Dbug50052.phpt5 $salt = '$1$f+uslYF01$';
7 echo $salt . "\n";
8 echo crypt($password,$salt) . "\n";
H A Dcrypt_blowfish_variation1.phpt20 foreach($salts as $i=>$salt) {
21 $crypt = crypt(b'U*U', $salt);
H A Dcrypt_variation1.phpt2 crypt() function - long salt
H A Dcrypt_sha256.phpt40 b'we have a short salt string but not a short password',
H A Dcrypt_sha512.phpt35 b'we have a short salt string but not a short password',
/PHP-5.5/ext/hash/
H A Dhash.c617 char *returnval, *algo, *salt, *pass; in PHP_FUNCTION() local
625 …END_NUM_ARGS() TSRMLS_CC, "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterat… in PHP_FUNCTION()
680 memcpy(computed_salt, (unsigned char *) salt, salt_len); in PHP_FUNCTION()
896 char *password, *salt; in PHP_FUNCTION() local
900 …ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &l_byte… in PHP_FUNCTION()
912 memcpy(padded_salt, salt, salt_len); in PHP_FUNCTION()
1151 ZEND_ARG_INFO(0, salt)
1170 ZEND_ARG_INFO(0, salt)
/PHP-5.5/ext/openssl/
H A Dopenssl.c257 ZEND_ARG_INFO(0, salt)
3483 char *salt; int salt_len; in PHP_FUNCTION() local
3491 &salt, &salt_len, in PHP_FUNCTION()
3515 …if (PKCS5_PBKDF2_HMAC(password, password_len, (unsigned char *)salt, salt_len, iterations, digest,… in PHP_FUNCTION()

Completed in 59 milliseconds

12