ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Public Member Functions | |
__construct (array $config=[]) | |
benchmarkCost (float $time_target=0.05) | |
getName () | |
isSupportedByRuntime () | |
getCosts () | |
setCosts (string $costs) | |
encodePassword (string $raw, string $salt) | |
isPasswordValid (string $encoded, string $raw, string $salt) | |
requiresReencoding (string $encoded) | |
![]() | |
isSupportedByRuntime () | |
requiresSalt () | |
requiresReencoding (string $encoded) | |
Protected Member Functions | |
init () | |
![]() | |
comparePasswords (string $knownString, string $userString) | |
Compares two passwords. More... | |
isPasswordTooLong (string $password) | |
Checks if the password is too long. More... | |
Protected Attributes | |
$costs = '08' | |
Additional Inherited Members | |
![]() | |
const | MAX_PASSWORD_LENGTH = 4096 |
Definition at line 11 of file class.ilBcryptPhpPasswordEncoder.php.
ilBcryptPhpPasswordEncoder::__construct | ( | array | $config = [] | ) |
array | $config |
ilPasswordException |
Definition at line 22 of file class.ilBcryptPhpPasswordEncoder.php.
References $config, benchmarkCost(), init(), and setCosts().
ilBcryptPhpPasswordEncoder::benchmarkCost | ( | float | $time_target = 0.05 | ) |
float | $time_target |
ilPasswordException |
Definition at line 55 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by __construct(), and ilBcryptPhpPasswordEncoderTest\testCostsCanBeDeterminedDynamically().
ilBcryptPhpPasswordEncoder::encodePassword | ( | string | $raw, |
string | $salt | ||
) |
ilPasswordException |
Implements ilPasswordEncoder.
Definition at line 113 of file class.ilBcryptPhpPasswordEncoder.php.
References getCosts(), and ilBasePasswordEncoder\isPasswordTooLong().
Referenced by ilBcryptPhpPasswordEncoderTest\testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding(), ilBcryptPhpPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), and ilBcryptPhpPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilBcryptPhpPasswordEncoder::getCosts | ( | ) |
Definition at line 89 of file class.ilBcryptPhpPasswordEncoder.php.
References $costs.
Referenced by ilBcryptPasswordEncoder\encode(), encodePassword(), requiresReencoding(), ilBcryptPhpPasswordEncoderTest\testCostsCanBeRetrievedWhenCostsAreSet(), and ilBcryptPasswordEncoderTest\testCostsCanBeRetrievedWhenCostsAreSet().
ilBcryptPhpPasswordEncoder::getName | ( | ) |
Implements ilPasswordEncoder.
Definition at line 73 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by ilBcryptPhpPasswordEncoderTest\testNameShouldBeBcryptPhp().
|
protected |
Definition at line 45 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by __construct().
ilBcryptPhpPasswordEncoder::isPasswordValid | ( | string | $encoded, |
string | $raw, | ||
string | $salt | ||
) |
Implements ilPasswordEncoder.
Definition at line 127 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by ilBcryptPhpPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), and ilBcryptPhpPasswordEncoderTest\testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength().
ilBcryptPhpPasswordEncoder::isSupportedByRuntime | ( | ) |
Implements ilPasswordEncoder.
Definition at line 81 of file class.ilBcryptPhpPasswordEncoder.php.
ilBcryptPhpPasswordEncoder::requiresReencoding | ( | string | $encoded | ) |
Implements ilPasswordEncoder.
Definition at line 135 of file class.ilBcryptPhpPasswordEncoder.php.
References getCosts().
Referenced by ilBcryptPhpPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilBcryptPhpPasswordEncoder::setCosts | ( | string | $costs | ) |
string | $costs |
ilPasswordException |
Definition at line 98 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by __construct(), ilBcryptPhpPasswordEncoderTest\testCostsCanBeRetrievedWhenCostsAreSet(), ilBcryptPasswordEncoderTest\testCostsCanBeRetrievedWhenCostsAreSet(), ilBcryptPhpPasswordEncoderTest\testCostsCanBeSetInRange(), ilBcryptPasswordEncoderTest\testCostsCanBeSetInRange(), ilBcryptPhpPasswordEncoderTest\testCostsCannotBeSetAboveRange(), ilBcryptPasswordEncoderTest\testCostsCannotBeSetAboveRange(), ilBcryptPhpPasswordEncoderTest\testCostsCannotBeSetBelowRange(), ilBcryptPasswordEncoderTest\testCostsCannotBeSetBelowRange(), ilBcryptPhpPasswordEncoderTest\testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding(), ilBcryptPasswordEncoderTest\testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding(), ilBcryptPhpPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), ilBcryptPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), ilBcryptPhpPasswordEncoderTest\testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength(), ilBcryptPasswordEncoderTest\testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength(), and ilBcryptPhpPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
|
protected |
Definition at line 16 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by getCosts().