From 8b554594188f73f0b31010cc0bf4f16c11cad2e4 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 21 Apr 2023 19:02:35 +0200 Subject: [PATCH] wip #5873 @0.25 --- src/Crypt.php | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5