diff --git a/typo3/sysext/saltedpasswords/Classes/Salt/AbstractComposedSalt.php b/typo3/sysext/saltedpasswords/Classes/Salt/AbstractComposedSalt.php index 3d1829f78c82c6824d787ea1b979216a96e500f0..69f829f9956dbc041fb0b742b20903d5c0a69a61 100644 --- a/typo3/sysext/saltedpasswords/Classes/Salt/AbstractComposedSalt.php +++ b/typo3/sysext/saltedpasswords/Classes/Salt/AbstractComposedSalt.php @@ -19,7 +19,7 @@ namespace TYPO3\CMS\Saltedpasswords\Salt; * Abstract class with methods needed to be extended * in a salted hashing class that composes an own salted password hash. */ -abstract class AbstractComposedSalt implements SaltInterface +abstract class AbstractComposedSalt implements ComposedSaltInterface { /** * Method applies settings (prefix, optional hash count, optional suffix) diff --git a/typo3/sysext/saltedpasswords/Classes/Salt/ComposedSaltInterface.php b/typo3/sysext/saltedpasswords/Classes/Salt/ComposedSaltInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..467c64cbc4965a5a4d53e9e90b7a6d1791bbe228 --- /dev/null +++ b/typo3/sysext/saltedpasswords/Classes/Salt/ComposedSaltInterface.php @@ -0,0 +1,38 @@ +<?php +declare(strict_types=1); +namespace TYPO3\CMS\Saltedpasswords\Salt; + +/* + * This file is part of the TYPO3 CMS project. + * + * It is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, either version 2 + * of the License, or any later version. + * + * For the full copyright and license information, please read the + * LICENSE.txt file that was distributed with this source code. + * + * The TYPO3 project - inspiring people to share! + */ + +/** + * Interface for implementing salts that compose the password-hash string + * themselves. + */ +interface ComposedSaltInterface extends SaltInterface +{ + /** + * Returns length of required salt. + * + * @return int Length of required salt + */ + public function getSaltLength(): int; + + /** + * Method determines if a given string is a valid salt + * + * @param string $salt String to check + * @return bool TRUE if it's valid salt, otherwise FALSE + */ + public function isValidSalt(string $salt): bool; +}