Lines Matching refs:salt
70 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_… in php_crypt() argument
75 if (salt[0] == '*' && (salt[1] == '0' || salt[1] == '1')) { in php_crypt()
85 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') { in php_crypt()
88 out = php_md5_crypt_r(password, salt, output); in php_crypt()
93 } else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') { in php_crypt()
97 crypt_res = php_sha512_crypt_r(password, salt, output, PHP_MAX_SALT_LEN); in php_crypt()
108 } else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') { in php_crypt()
112 crypt_res = php_sha256_crypt_r(password, salt, output, PHP_MAX_SALT_LEN); in php_crypt()
124 salt[0] == '$' && in php_crypt()
125 salt[1] == '2' && in php_crypt()
126 salt[2] != 0 && in php_crypt()
127 salt[3] == '$') { in php_crypt()
132 crypt_res = php_crypt_blowfish_rn(password, salt, output, sizeof(output)); in php_crypt()
141 } else if (salt[0] == '_' in php_crypt()
142 || (IS_VALID_SALT_CHARACTER(salt[0]) && IS_VALID_SALT_CHARACTER(salt[1]))) { in php_crypt()
147 crypt_res = _crypt_extended_r((const unsigned char *) password, salt, &buffer); in php_crypt()
148 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
170 crypt_res = crypt_r(password, salt, &buffer); in php_crypt()
172 crypt_res = crypt(password, salt); in php_crypt()
178 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
203 char salt[PHP_MAX_SALT_LEN + 1]; in PHP_FUNCTION() local
213 salt[0] = salt[PHP_MAX_SALT_LEN] = '\0'; in PHP_FUNCTION()
217 memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1); in PHP_FUNCTION()
218 memcpy(salt, salt_in, MIN(PHP_MAX_SALT_LEN, salt_in_len)); in PHP_FUNCTION()
221 salt[salt_in_len] = '\0'; in PHP_FUNCTION()
223 if ((result = php_crypt(str, (int)str_len, salt, (int)salt_in_len, 0)) == NULL) { in PHP_FUNCTION()
224 if (salt[0] == '*' && salt[1] == '0') { in PHP_FUNCTION()