ILIAS
release_8 Revision v8.19
|
Public Member Functions | |
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... | |
![]() | |
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... | |
getName () | |
Returns a unique name/id of the concrete password encoder. More... | |
Protected Member Functions | |
comparePasswords (string $knownString, string $userString) | |
Compares two passwords. More... | |
isPasswordTooLong (string $password) | |
Private Attributes | |
const | MAX_PASSWORD_LENGTH = 4096 |
Definition at line 26 of file class.ilBasePasswordEncoder.php.
|
protected |
Compares two passwords.
This method implements a constant-time algorithm to compare passwords to avoid (remote) timing attacks. http://codahale.com/a-lesson-in-timing-attacks/
string | $knownString | The first password |
string | $userString | The second password |
Definition at line 40 of file class.ilBasePasswordEncoder.php.
References $i.
Referenced by ilBcryptPasswordEncoder\check(), and ilMd5PasswordEncoder\isPasswordValid().
|
protected |
Definition at line 57 of file class.ilBasePasswordEncoder.php.
Referenced by ilMd5PasswordEncoder\encodePassword(), ilBcryptPhpPasswordEncoder\encodePassword(), ilBcryptPasswordEncoder\encodePassword(), ilMd5PasswordEncoder\isPasswordValid(), and ilBcryptPasswordEncoder\isPasswordValid().
ilBasePasswordEncoder::isSupportedByRuntime | ( | ) |
Returns whether the encoder is supported by the runtime (PHP, HHVM, ...)
Implements ilPasswordEncoder.
Definition at line 62 of file class.ilBasePasswordEncoder.php.
ilBasePasswordEncoder::requiresReencoding | ( | string | $encoded | ) |
Returns whether the encoded password needs to be re-encoded.
Implements ilPasswordEncoder.
Definition at line 72 of file class.ilBasePasswordEncoder.php.
Referenced by ilMd5PasswordEncoderTest\testEncoderDoesNotSupportReencoding().
ilBasePasswordEncoder::requiresSalt | ( | ) |
Returns whether the encoder requires a salt.
Implements ilPasswordEncoder.
Definition at line 67 of file class.ilBasePasswordEncoder.php.
Referenced by ilMd5PasswordEncoderTest\testEncoderDoesNotRelyOnSalts(), and ilBcryptPhpPasswordEncoderTest\testEncoderDoesNotRelyOnSalts().
|
private |
Definition at line 29 of file class.ilBasePasswordEncoder.php.