Lines Matching refs:options
106 …c zend_string* php_password_get_salt(zval *unused_, size_t required_salt_len, HashTable *options) { in php_password_get_salt() argument
107 if (options && zend_hash_str_exists(options, "salt", sizeof("salt") - 1)) { in php_password_get_salt()
136 static bool php_password_bcrypt_needs_rehash(const zend_string *hash, zend_array *options) { in php_password_bcrypt_needs_rehash() argument
147 if (options && (znew_cost = zend_hash_str_find(options, "cost", sizeof("cost")-1)) != NULL) { in php_password_bcrypt_needs_rehash()
177 static zend_string* php_password_bcrypt_hash(const zend_string *password, zend_array *options) { in php_password_bcrypt_hash() argument
189 if (options && (zcost = zend_hash_str_find(options, "cost", sizeof("cost")-1)) != NULL) { in php_password_bcrypt_hash()
199 if (!(salt = php_password_get_salt(NULL, Z_UL(22), options))) { in php_password_bcrypt_hash()
275 static bool php_password_argon2_needs_rehash(const zend_string *hash, zend_array *options) { in php_password_argon2_needs_rehash() argument
282 …if (options && (option_buffer = zend_hash_str_find(options, "memory_cost", sizeof("memory_cost")-1… in php_password_argon2_needs_rehash()
286 …if (options && (option_buffer = zend_hash_str_find(options, "time_cost", sizeof("time_cost")-1)) !… in php_password_argon2_needs_rehash()
290 …if (options && (option_buffer = zend_hash_str_find(options, "threads", sizeof("threads")-1)) != NU… in php_password_argon2_needs_rehash()
301 static zend_string *php_password_argon2_hash(const zend_string *password, zend_array *options, argo… in php_password_argon2_hash() argument
310 …if (options && (option_buffer = zend_hash_str_find(options, "memory_cost", sizeof("memory_cost")-1… in php_password_argon2_hash()
319 …if (options && (option_buffer = zend_hash_str_find(options, "time_cost", sizeof("time_cost")-1)) !… in php_password_argon2_hash()
328 …if (options && (option_buffer = zend_hash_str_find(options, "threads", sizeof("threads")-1)) != NU… in php_password_argon2_hash()
337 if (!(salt = php_password_get_salt(NULL, Z_UL(16), options))) { in php_password_argon2_hash()
387 static zend_string *php_password_argon2i_hash(const zend_string *password, zend_array *options) { in php_password_argon2i_hash() argument
388 return php_password_argon2_hash(password, options, Argon2_i); in php_password_argon2i_hash()
406 static zend_string *php_password_argon2id_hash(const zend_string *password, zend_array *options) { in php_password_argon2id_hash() argument
407 return php_password_argon2_hash(password, options, Argon2_id); in php_password_argon2id_hash()
546 zval options; in PHP_FUNCTION() local
553 array_init(&options); in PHP_FUNCTION()
563 add_assoc_zval(return_value, "options", &options); in PHP_FUNCTION()
572 algo->get_info(&options, hash); in PHP_FUNCTION()
574 add_assoc_zval(return_value, "options", &options); in PHP_FUNCTION()
586 zend_array *options = NULL; in PHP_FUNCTION() local
592 Z_PARAM_ARRAY_HT(options) in PHP_FUNCTION()
607 RETURN_BOOL(old_algo->needs_rehash(hash, options)); in PHP_FUNCTION()
635 zend_array *options = NULL; in PHP_FUNCTION() local
641 Z_PARAM_ARRAY_HT(options) in PHP_FUNCTION()
650 digest = algo->hash(password, options); in PHP_FUNCTION()