Lines Matching refs:digest

138 	zend_string *digest = NULL, *salt64 = NULL, *hash64 = NULL;  in php_openssl_argon2_hash()  local
161 digest = zend_string_alloc(PHP_OPENSSL_DIGEST_SIZE, 0); in php_openssl_argon2_hash()
162 ZSTR_LEN(digest) = snprintf(ZSTR_VAL(digest), ZSTR_LEN(digest), "$%s$v=%d$m=%u,t=%u,p=%u$%s$%s", in php_openssl_argon2_hash()
168 return digest; in php_openssl_argon2_hash()
172 const zend_string *digest, uint32_t *version, uint32_t *memlimit, uint32_t *iterlimit, in php_openssl_argon2_extract() argument
178 if (!digest || (ZSTR_LEN(digest) < sizeof("$argon2id$"))) { in php_openssl_argon2_extract()
181 p = ZSTR_VAL(digest); in php_openssl_argon2_extract()
219 static bool php_openssl_argon2_verify(const zend_string *password, const zend_string *digest, const… in php_openssl_argon2_verify() argument
225 if ((ZSTR_LEN(password) >= UINT32_MAX) || (ZSTR_LEN(digest) >= UINT32_MAX)) { in php_openssl_argon2_verify()
228 …if (FAILURE == php_openssl_argon2_extract(digest, &version, &memlimit, &iterlimit, &threads, &salt… in php_openssl_argon2_verify()
246 static bool php_openssl_argon2i_verify(const zend_string *password, const zend_string *digest) in php_openssl_argon2i_verify() argument
248 return php_openssl_argon2_verify(password, digest, "argon2i"); in php_openssl_argon2i_verify()
251 static bool php_openssl_argon2id_verify(const zend_string *password, const zend_string *digest) in php_openssl_argon2id_verify() argument
253 return php_openssl_argon2_verify(password, digest, "argon2id"); in php_openssl_argon2id_verify()
322 zend_string *password, *algo, *digest; in PHP_FUNCTION() local
337 digest = php_openssl_argon2_hash(password, options, ZSTR_VAL(algo)); in PHP_FUNCTION()
338 if (!digest) { in PHP_FUNCTION()
345 RETURN_NEW_STR(digest); in PHP_FUNCTION()
350 zend_string *password, *algo, *digest; in PHP_FUNCTION() local
355 Z_PARAM_STR(digest) in PHP_FUNCTION()
363 RETURN_BOOL(php_openssl_argon2_verify(password, digest, ZSTR_VAL(algo))); in PHP_FUNCTION()