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()
179 char *hash, *algo_name; in PHP_FUNCTION() local
182 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &hash, &hash_len) == FAILURE) { in PHP_FUNCTION()
194 algo = php_password_determine_algo(hash, (size_t) hash_len); in PHP_FUNCTION()
201 sscanf(hash, "$2y$%ld$", &cost); in PHP_FUNCTION()
222 char *hash; in PHP_FUNCTION() local
226 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|H", &hash, &hash_len, &new_algo, &options… in PHP_FUNCTION()
235 algo = php_password_determine_algo(hash, (size_t) hash_len); in PHP_FUNCTION()
258 sscanf(hash, "$2y$%ld$", &cost); in PHP_FUNCTION()
277 char *ret, *password, *hash; in PHP_FUNCTION() local
279 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &password, &password_len, &hash, &hash_… in PHP_FUNCTION()
282 if (php_crypt(password, password_len, hash, hash_len, &ret) == FAILURE) { in PHP_FUNCTION()
296 status |= (ret[i] ^ hash[i]); in PHP_FUNCTION()
310 char *hash_format, *hash, *salt, *password, *result; in PHP_FUNCTION() local
426 hash = safe_emalloc(salt_len + hash_format_len, 1, 1); in PHP_FUNCTION()
427 sprintf(hash, "%s%s", hash_format, salt); in PHP_FUNCTION()
428 hash[hash_format_len + salt_len] = 0; in PHP_FUNCTION()
436 if (php_crypt(password, password_len, hash, hash_len, &result) == FAILURE) { in PHP_FUNCTION()
437 efree(hash); in PHP_FUNCTION()
441 efree(hash); in PHP_FUNCTION()