public function validate($raw = null, $hash = null) { return function_exists('password_hash') ? password_verify($raw, $hash) : $hash === hash('sha512', $raw . $this->_config->get('salt')); }
/** * benchValidate * * @since 3.0.0 * * @param array $parameterArray * * @ParamProviders({"providerHash"}) */ public function benchValidate($parameterArray = []) { /* setup */ $hash = new Hash($this->_config); $hash->init($parameterArray[0]); /* bench */ $hash->validate($parameterArray[0], function_exists('password_verify') ? $parameterArray[1][0][1] : $parameterArray[1][1]); }