From 89598a5b367a6ec8e031b8f43efde5fd99fb8c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=81ojewski?= Date: Mon, 2 Jul 2018 21:06:20 +0200 Subject: [PATCH] make getSalt() abstract --- lib/Crypto/AbstractCrypt.php | 5 +---- lib/Crypto/Crypt.php | 8 ++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/Crypto/AbstractCrypt.php b/lib/Crypto/AbstractCrypt.php index c13e1b5..7ce1c94 100644 --- a/lib/Crypto/AbstractCrypt.php +++ b/lib/Crypto/AbstractCrypt.php @@ -56,8 +56,5 @@ abstract class AbstractCrypt extends AbstractAlgorithm * * @return string The salt string. */ - protected function getSalt() - { - return ""; - } + protected abstract function getSalt(); } diff --git a/lib/Crypto/Crypt.php b/lib/Crypto/Crypt.php index c52be8d..609bdcb 100644 --- a/lib/Crypto/Crypt.php +++ b/lib/Crypto/Crypt.php @@ -56,4 +56,12 @@ class Crypt extends AbstractCrypt { return "Unix (Crypt)"; } + + /** + * Not used. + */ + protected function getSalt() + { + return null; + } }