]> _ Git - cubist_util.git/commitdiff
wip #5873 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 21 Apr 2023 17:02:35 +0000 (19:02 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 21 Apr 2023 17:02:35 +0000 (19:02 +0200)
src/Crypt.php

index cb04b4199af63a497e04179fc3b250d760c92a95..93c90f3169d9a4677c8e90f463e67362d670d0eb 100644 (file)
@@ -57,4 +57,9 @@ class Crypt
         sodium_memzero($key);
         return $plain;
     }
+
+    public static function isHashed($str)
+    {
+        return preg_match('/^\$2[ayb]\$.{56}$/', $str, $matches);
+    }
 }
\ No newline at end of file