Lines Matching refs:hash
60 static php_password_algo php_password_determine_algo(const char *hash, const size_t len) in php_password_determine_algo() argument
62 if (len > 3 && hash[0] == '$' && hash[1] == '2' && hash[2] == 'y' && len == 60) { in php_password_determine_algo()
150 char *hash, *algo_name; in PHP_FUNCTION() local
153 if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &hash, &hash_len) == FAILURE) { in PHP_FUNCTION()
159 algo = php_password_determine_algo(hash, (size_t) hash_len); in PHP_FUNCTION()
166 sscanf(hash, "$2y$" ZEND_LONG_FMT "$", &cost); in PHP_FUNCTION()
187 char *hash; in PHP_FUNCTION() local
191 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|H", &hash, &hash_len, &new_algo, &options) == FAILU… in PHP_FUNCTION()
195 algo = php_password_determine_algo(hash, (size_t) hash_len); in PHP_FUNCTION()
210 sscanf(hash, "$2y$" ZEND_LONG_FMT "$", &cost); in PHP_FUNCTION()
229 char *password, *hash; in PHP_FUNCTION() local
232 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &password, &password_len, &hash, &hash_len) == FA… in PHP_FUNCTION()
235 if ((ret = php_crypt(password, (int)password_len, hash, (int)hash_len, 1)) == NULL) { in PHP_FUNCTION()
249 status |= (ZSTR_VAL(ret)[i] ^ hash[i]); in PHP_FUNCTION()
263 char hash_format[8], *hash, *salt, *password; in PHP_FUNCTION() local
361 hash = safe_emalloc(salt_len + hash_format_len, 1, 1); in PHP_FUNCTION()
362 sprintf(hash, "%s%s", hash_format, salt); in PHP_FUNCTION()
363 hash[hash_format_len + salt_len] = 0; in PHP_FUNCTION()
370 if ((result = php_crypt(password, (int)password_len, hash, hash_len, 1)) == NULL) { in PHP_FUNCTION()
371 efree(hash); in PHP_FUNCTION()
375 efree(hash); in PHP_FUNCTION()