diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index 54b918984b7507afe12f432e611a190fbfdc66e1..3d03c1e057969704e3397c0eeed8f0e2eb646e5a 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -91,7 +91,7 @@ class PassHash {
         //crypt and compare
         $call = 'hash_'.$method;
         $newhash = $this->$call($clear, $salt, $magic);
-        if($newhash === $hash) {
+        if(\hash_equals($newhash, $hash)) {
             return true;
         }
         return false;