*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
return \hash_equals($hash, $this->hashWithSalt($password, $salt));
}
*/
public function verify(string $password, string $hash): bool
{
- [$hash, $salt] = \explode(':', $hash, 2);
+ $parts = \explode(':', $hash, 2);
+ $hash = $parts[0];
+ $salt = $parts[1] ?? '';
if (\hash_equals($hash, \sha1(\sha1($password) . $salt))) {
return true;