ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | ||||||||||
__construct (array $config=array()) | ||||||||||
benchmarkCost ($time_target=0.05) | ||||||||||
getName () | ||||||||||
isSupportedByRuntime () | ||||||||||
{Returns whether or not the encoder is supported by the runtime (PHP, HHVM, ...)
| ||||||||||
getCosts () | ||||||||||
setCosts ($costs) | ||||||||||
encodePassword ($raw, $salt) | ||||||||||
{Encodes the raw password.
| ||||||||||
isPasswordValid ($encoded, $raw, $salt) | ||||||||||
{Checks a raw password against an encoded password.The raw password has to be injected into the encoder instance before.
| ||||||||||
requiresReencoding ($encoded) | ||||||||||
{Returns whether or not the a encoded password needs to be re-encoded.
| ||||||||||
Public Member Functions inherited from ilBasePasswordEncoder | ||||||||||
isSupportedByRuntime () | ||||||||||
{Returns whether or not the encoder is supported by the runtime (PHP, HHVM, ...)
| ||||||||||
requiresSalt () | ||||||||||
{Returns whether or not the encoder requires a salt.
| ||||||||||
requiresReencoding ($encoded) | ||||||||||
{Returns whether or not the a encoded password needs to be re-encoded.
| ||||||||||
Protected Member Functions | |
init () | |
Protected Member Functions inherited from ilBasePasswordEncoder | |
comparePasswords ($known_string, $user_string) | |
Compares two passwords. More... | |
isPasswordTooLong ($password) | |
Checks if the password is too long. More... | |
Protected Attributes | |
$costs = '08' | |
Additional Inherited Members | |
Data Fields inherited from ilBasePasswordEncoder | |
const | MAX_PASSWORD_LENGTH = 4096 |
Definition at line 11 of file class.ilBcryptPhpPasswordEncoder.php.
ilBcryptPhpPasswordEncoder::__construct | ( | array | $config = array() | ) |
array | $config |
ilPasswordException |
Definition at line 22 of file class.ilBcryptPhpPasswordEncoder.php.
References $config, $key, benchmarkCost(), init(), and setCosts().
ilBcryptPhpPasswordEncoder::benchmarkCost | ( | $time_target = 0.05 | ) |
float | $time_target |
Definition at line 54 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by __construct(), and ilBcryptPhpPasswordEncoderTest\testCostsCanBeDeterminedDynamically().
ilBcryptPhpPasswordEncoder::encodePassword | ( | $raw, | |
$salt | |||
) |
{Encodes the raw password.
string | $raw | The password to encode |
string | $salt | The 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 88 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 72 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by ilBcryptPhpPasswordEncoderTest\testNameShouldBeBcryptPhp().
|
protected |
Definition at line 45 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by __construct().
ilBcryptPhpPasswordEncoder::isPasswordValid | ( | $encoded, | |
$raw, | |||
$salt | |||
) |
{Checks a raw password against an encoded password.The raw password has to be injected into the encoder instance before.
string | $encoded | An encoded password |
string | $raw | A raw password |
string | $salt | The salt |
Implements ilPasswordEncoder.
Definition at line 128 of file class.ilBcryptPhpPasswordEncoder.php.
Referenced by ilBcryptPhpPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), and ilBcryptPhpPasswordEncoderTest\testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength().
ilBcryptPhpPasswordEncoder::isSupportedByRuntime | ( | ) |
{Returns whether or not the encoder is supported by the runtime (PHP, HHVM, ...)
Implements ilPasswordEncoder.
Definition at line 80 of file class.ilBcryptPhpPasswordEncoder.php.
ilBcryptPhpPasswordEncoder::requiresReencoding | ( | $encoded | ) |
{Returns whether or not the a encoded password needs to be re-encoded.
$encoded | string |
Implements ilPasswordEncoder.
Definition at line 136 of file class.ilBcryptPhpPasswordEncoder.php.
References getCosts().
Referenced by ilBcryptPhpPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilBcryptPhpPasswordEncoder::setCosts | ( | $costs | ) |
string | $costs |
ilPasswordException |
Definition at line 97 of file class.ilBcryptPhpPasswordEncoder.php.
References $costs.
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(), and setCosts().