Lines Matching refs:salt
82 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_… in php_crypt() argument
87 if (salt[0] == '*' && (salt[1] == '0' || salt[1] == '1')) { in php_crypt()
97 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') { in php_crypt()
100 out = php_md5_crypt_r(password, salt, output); in php_crypt()
105 } else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') { in php_crypt()
109 crypt_res = php_sha512_crypt_r(password, salt, output, PHP_MAX_SALT_LEN); in php_crypt()
120 } else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') { in php_crypt()
124 crypt_res = php_sha256_crypt_r(password, salt, output, PHP_MAX_SALT_LEN); in php_crypt()
136 salt[0] == '$' && in php_crypt()
137 salt[1] == '2' && in php_crypt()
138 salt[2] != 0 && in php_crypt()
139 salt[3] == '$') { in php_crypt()
144 crypt_res = php_crypt_blowfish_rn(password, salt, output, sizeof(output)); in php_crypt()
153 } else if (salt[0] == '_' in php_crypt()
154 || (IS_VALID_SALT_CHARACTER(salt[0]) && IS_VALID_SALT_CHARACTER(salt[1]))) { in php_crypt()
159 crypt_res = _crypt_extended_r((const unsigned char *) password, salt, &buffer); in php_crypt()
160 if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) { in php_crypt()
182 crypt_res = crypt_r(password, salt, &buffer); in php_crypt()
184 crypt_res = crypt(password, salt); in php_crypt()
190 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()