Lines Matching refs:salt

152 	char salt[PHP_MAX_SALT_LEN + 1];  in PHP_FUNCTION()  local
156 salt[0] = salt[PHP_MAX_SALT_LEN] = '\0'; in PHP_FUNCTION()
160 memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1); in PHP_FUNCTION()
167 memcpy(salt, salt_in, MIN(PHP_MAX_SALT_LEN, salt_in_len)); in PHP_FUNCTION()
171 if (!*salt) { in PHP_FUNCTION()
173 strncpy(salt, "$1$", PHP_MAX_SALT_LEN); in PHP_FUNCTION()
174 php_to64(&salt[3], PHP_CRYPT_RAND, 4); in PHP_FUNCTION()
175 php_to64(&salt[7], PHP_CRYPT_RAND, 4); in PHP_FUNCTION()
176 strncpy(&salt[11], "$", PHP_MAX_SALT_LEN - 11); in PHP_FUNCTION()
178 php_to64(&salt[0], PHP_CRYPT_RAND, 2); in PHP_FUNCTION()
179 salt[2] = '\0'; in PHP_FUNCTION()
181 salt_in_len = strlen(salt); in PHP_FUNCTION()
192 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') { in PHP_FUNCTION()
195 RETURN_STRING(php_md5_crypt_r(str, salt, output), 1); in PHP_FUNCTION()
196 } else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') { in PHP_FUNCTION()
204 salt[salt_in_len] = '\0'; in PHP_FUNCTION()
206 crypt_res = php_sha512_crypt_r(str, salt, output, needed); in PHP_FUNCTION()
208 if (salt[0]=='*' && salt[1]=='0') { in PHP_FUNCTION()
219 } else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') { in PHP_FUNCTION()
227 salt[salt_in_len] = '\0'; in PHP_FUNCTION()
229 crypt_res = php_sha256_crypt_r(str, salt, output, needed); in PHP_FUNCTION()
231 if (salt[0]=='*' && salt[1]=='0') { in PHP_FUNCTION()
243 salt[0] == '$' && in PHP_FUNCTION()
244 salt[1] == '2' && in PHP_FUNCTION()
245 salt[2] >= 'a' && salt[2] <= 'z' && in PHP_FUNCTION()
246 salt[3] == '$' && in PHP_FUNCTION()
247 salt[4] >= '0' && salt[4] <= '3' && in PHP_FUNCTION()
248 salt[5] >= '0' && salt[5] <= '9' && in PHP_FUNCTION()
249 salt[6] == '$') { in PHP_FUNCTION()
254 crypt_res = php_crypt_blowfish_rn(str, salt, output, sizeof(output)); in PHP_FUNCTION()
256 if (salt[0]=='*' && salt[1]=='0') { in PHP_FUNCTION()
270 crypt_res = _crypt_extended_r(str, salt, &buffer); in PHP_FUNCTION()
272 if (salt[0]=='*' && salt[1]=='0') { in PHP_FUNCTION()
294 crypt_res = crypt_r(str, salt, &buffer); in PHP_FUNCTION()
296 if (salt[0]=='*' && salt[1]=='0') { in PHP_FUNCTION()