ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
Public Member Functions | |
__construct (array $config=[]) | |
getMemoryCost () | |
setMemoryCost (int $memory_costs) | |
getTimeCost () | |
setTimeCost (int $time_cost) | |
getThreads () | |
setThreads (int $threads) | |
getName () | |
Returns a unique name/id of the concrete password encoder. More... | |
isSupportedByRuntime () | |
Returns whether the encoder is supported by the runtime (PHP, HHVM, ...) More... | |
encodePassword (string $raw, string $salt) | |
Encodes the raw password. More... | |
isPasswordValid (string $encoded, string $raw, string $salt) | |
Checks a raw password against an encoded password. More... | |
requiresReencoding (string $encoded) | |
Returns whether the encoded password needs to be re-encoded. More... | |
![]() | |
isSupportedByRuntime () | |
Returns whether the encoder is supported by the runtime (PHP, HHVM, ...) More... | |
requiresSalt () | |
Returns whether the encoder requires a salt. More... | |
requiresReencoding (string $encoded) | |
Returns whether the encoded password needs to be re-encoded. More... | |
Private Attributes | |
const | CONFIG_KEY_TIME_COST = 'time_cost' |
const | CONFIG_KEY_MEMORY_COST = 'memory_cost' |
const | CONFIG_KEY_THREADS = 'threads' |
int | $memory_cost = null |
int | $time_cost = null |
int | $threads = null |
Additional Inherited Members | |
![]() | |
comparePasswords (string $knownString, string $userString) | |
Compares two passwords. More... | |
isPasswordTooLong (string $password) | |
Definition at line 21 of file class.ilArgon2IdPasswordEncoder.php.
ilArgon2idPasswordEncoder::__construct | ( | array | $config = [] | ) |
array<string,mixed> | $config |
Definition at line 34 of file class.ilArgon2IdPasswordEncoder.php.
References isSupportedByRuntime(), setMemoryCost(), setThreads(), and setTimeCost().
ilArgon2idPasswordEncoder::encodePassword | ( | string | $raw, |
string | $salt | ||
) |
Encodes the raw password.
string | $raw | The password to encode |
string | $salt | The salt |
Implements ilPasswordEncoder.
Definition at line 111 of file class.ilArgon2IdPasswordEncoder.php.
References getMemoryCost(), getThreads(), getTimeCost(), and ilBasePasswordEncoder\isPasswordTooLong().
Referenced by ilArgon2IdPasswordEncoderTest\testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding(), ilArgon2IdPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), and ilArgon2IdPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilArgon2idPasswordEncoder::getMemoryCost | ( | ) |
Definition at line 67 of file class.ilArgon2IdPasswordEncoder.php.
References $memory_cost.
Referenced by encodePassword(), and requiresReencoding().
ilArgon2idPasswordEncoder::getName | ( | ) |
Returns a unique name/id of the concrete password encoder.
Implements ilPasswordEncoder.
Definition at line 97 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by ilArgon2IdPasswordEncoderTest\testNameShouldBeArgon2id().
ilArgon2idPasswordEncoder::getThreads | ( | ) |
Definition at line 87 of file class.ilArgon2IdPasswordEncoder.php.
References $threads.
Referenced by encodePassword(), and requiresReencoding().
ilArgon2idPasswordEncoder::getTimeCost | ( | ) |
Definition at line 77 of file class.ilArgon2IdPasswordEncoder.php.
References $time_cost.
Referenced by encodePassword(), and requiresReencoding().
ilArgon2idPasswordEncoder::isPasswordValid | ( | string | $encoded, |
string | $raw, | ||
string | $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, may be empty |
Implements ilPasswordEncoder.
Definition at line 124 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by ilArgon2IdPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), and ilArgon2IdPasswordEncoderTest\testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength().
ilArgon2idPasswordEncoder::isSupportedByRuntime | ( | ) |
Returns whether the encoder is supported by the runtime (PHP, HHVM, ...)
Implements ilPasswordEncoder.
Definition at line 102 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by __construct().
ilArgon2idPasswordEncoder::requiresReencoding | ( | string | $encoded | ) |
Returns whether the encoded password needs to be re-encoded.
Implements ilPasswordEncoder.
Definition at line 129 of file class.ilArgon2IdPasswordEncoder.php.
References getMemoryCost(), getThreads(), and getTimeCost().
Referenced by ilArgon2IdPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilArgon2idPasswordEncoder::setMemoryCost | ( | int | $memory_costs | ) |
Definition at line 72 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by __construct(), and ilArgon2IdPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilArgon2idPasswordEncoder::setThreads | ( | int | $threads | ) |
Definition at line 92 of file class.ilArgon2IdPasswordEncoder.php.
References $threads.
Referenced by __construct(), and ilArgon2IdPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
ilArgon2idPasswordEncoder::setTimeCost | ( | int | $time_cost | ) |
Definition at line 82 of file class.ilArgon2IdPasswordEncoder.php.
References $time_cost.
Referenced by __construct(), and ilArgon2IdPasswordEncoderTest\testReencodingIsDetectedWhenNecessary().
|
private |
Definition at line 27 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by getMemoryCost().
|
private |
Definition at line 29 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by getThreads(), and setThreads().
|
private |
Definition at line 28 of file class.ilArgon2IdPasswordEncoder.php.
Referenced by getTimeCost(), and setTimeCost().
|
private |
Definition at line 24 of file class.ilArgon2IdPasswordEncoder.php.
|
private |
Definition at line 25 of file class.ilArgon2IdPasswordEncoder.php.
|
private |
Definition at line 23 of file class.ilArgon2IdPasswordEncoder.php.