From: Vincent Vanwaelscappel Date: Fri, 21 Apr 2023 17:02:35 +0000 (+0200) Subject: wip #5873 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8b554594188f73f0b31010cc0bf4f16c11cad2e4;p=cubist_util.git wip #5873 @0.25 --- diff --git a/src/Crypt.php b/src/Crypt.php index cb04b41..93c90f3 100644 --- a/src/Crypt.php +++ b/src/Crypt.php @@ -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