From 0cc72b66504328e4f8376f2d51226c11a1b58106 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 17 Sep 2017 22:05:10 +0200 Subject: [PATCH] Hopefully the last one...... --- Gishiki/Security/Hashing/Hasher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gishiki/Security/Hashing/Hasher.php b/Gishiki/Security/Hashing/Hasher.php index a3a74a98..e1a89fce 100644 --- a/Gishiki/Security/Hashing/Hasher.php +++ b/Gishiki/Security/Hashing/Hasher.php @@ -34,7 +34,7 @@ final class Hasher /** * @var bool true if the algorithm name has to be passed */ - private $algorithmRequired; + private $algorithmRequired = false; /** * @var string the name of the function to be called to produce a message digest @@ -66,6 +66,7 @@ public function __construct($algorithm = Algorithm::BCRYPT) { } else if ((in_array($algorithm, openssl_get_md_methods())) && (in_array($algorithm, hash_algos()))) { $this->algorithm = $algorithm; + $this->algorithmRequired = true; $this->hashCallback = Algorithm::class."::opensslHash"; $this->verifyCallback = Algorithm::class."::opensslVerify"; }