REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 2.40 KB
Close
/home/jambtst2015/public_html/ida.com.ng/libraries/src/Authentication/Password/ChainedHandler.php
Text
Base64
<?php /** * Joomla! Content Management System * * @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ namespace Joomla\CMS\Authentication\Password; \defined('JPATH_PLATFORM') or die; use Joomla\Authentication\Password\HandlerInterface; /** * Password handler supporting testing against a chain of handlers * * @since 4.0.0 */ class ChainedHandler implements HandlerInterface, CheckIfRehashNeededHandlerInterface { /** * The password handlers in use by this chain. * * @var HandlerInterface[] * @since 4.0.0 */ private $handlers = []; /** * Add a handler to the chain * * @param HandlerInterface $handler The password handler to add * * @return void * * @since 4.0.0 */ public function addHandler(HandlerInterface $handler) { $this->handlers[] = $handler; } /** * Check if the password requires rehashing * * @param string $hash The password hash to check * * @return boolean * * @since 4.0.0 */ public function checkIfRehashNeeded(string $hash): bool { foreach ($this->handlers as $handler) { if ($handler instanceof CheckIfRehashNeededHandlerInterface && $handler->isSupported() && $handler->checkIfRehashNeeded($hash)) { return true; } } return false; } /** * Generate a hash for a plaintext password * * @param string $plaintext The plaintext password to validate * @param array $options Options for the hashing operation * * @return void * * @since 4.0.0 * @throws \RuntimeException */ public function hashPassword($plaintext, array $options = []) { throw new \RuntimeException('The chained password handler cannot be used to hash a password'); } /** * Check that the password handler is supported in this environment * * @return boolean * * @since 4.0.0 */ public static function isSupported() { return true; } /** * Validate a password * * @param string $plaintext The plain text password to validate * @param string $hashed The password hash to validate against * * @return boolean * * @since 4.0.0 */ public function validatePassword($plaintext, $hashed) { foreach ($this->handlers as $handler) { if ($handler->isSupported() && $handler->validatePassword($plaintext, $hashed)) { return true; } } return false; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Argon2idHandler.php
829 B
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Argon2iHandler.php
823 B
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BCryptHandler.php
817 B
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ChainedHandler.php
2.40 KB
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CheckIfRehashNeededHandlerInterface.php
684 B
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MD5Handler.php
2.11 KB
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PHPassHandler.php
1.94 KB
lrw-r--r--
2024-11-22 17:53:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).