|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
Inheritance diagram for ilBcryptPasswordEncoder:
Collaboration diagram for ilBcryptPasswordEncoder:Public Member Functions | |
| __construct (array $config=[]) | |
| getDataDirectory () | |
| setDataDirectory (string $data_directory) | |
| isBackwardCompatibilityEnabled () | |
| setBackwardCompatibility (bool $backward_compatibility) | |
| Set the backward compatibility $2a$ instead of $2y$ for PHP 5.3.7+. More... | |
| isSecurityFlawIgnored () | |
| setIsSecurityFlawIgnored (bool $is_security_flaw_ignored) | |
| getClientSalt () | |
| setClientSalt (?string $client_salt) | |
| 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... | |
| requiresSalt () | |
| Returns whether the encoder requires a salt. More... | |
| requiresReencoding (string $encoded) | |
| Returns whether the encoded password needs to be re-encoded. More... | |
| getClientSaltLocation () | |
Public Member Functions inherited from ilBcryptPhpPasswordEncoder | |
| __construct (array $config=[]) | |
| benchmarkCost (float $time_target=0.05) | |
| getName () | |
| Returns a unique name/id of the concrete password encoder. More... | |
| getCosts () | |
| setCosts (string $costs) | |
| 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... | |
Public Member Functions inherited from ilBasePasswordEncoder | |
| 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... | |
Data Fields | |
| const | SALT_STORAGE_FILENAME = 'pwsalt.txt' |
Private Member Functions | |
| isBcryptSupported () | |
| encode (string $raw, string $userSecret) | |
| check (string $encoded, string $raw, string $salt) | |
| readClientSalt () | |
| generateClientSalt () | |
| storeClientSalt () | |
Private Attributes | |
| const | MIN_SALT_SIZE = 16 |
| string | $client_salt = null |
| bool | $is_security_flaw_ignored = false |
| bool | $backward_compatibility = false |
| string | $data_directory = '' |
Additional Inherited Members | |
Protected Member Functions inherited from ilBasePasswordEncoder | |
| comparePasswords (string $knownString, string $userString) | |
| Compares two passwords. More... | |
| isPasswordTooLong (string $password) | |
Definition at line 27 of file class.ilBcryptPasswordEncoder.php.
| ilBcryptPasswordEncoder::__construct | ( | array | $config = [] | ) |
| array<string,mixed> | $config |
| ilPasswordException |
Definition at line 44 of file class.ilBcryptPasswordEncoder.php.
References ILIAS\LTI\ToolProvider\$key, ILIAS\MetaData\Repository\Validation\Data\__construct(), readClientSalt(), setDataDirectory(), and setIsSecurityFlawIgnored().
Here is the call graph for this function:
|
private |
Definition at line 185 of file class.ilBcryptPasswordEncoder.php.
References ilBasePasswordEncoder\comparePasswords().
Referenced by isPasswordValid().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Check for security flaw in the bcrypt implementation used by crypt()
Definition at line 144 of file class.ilBcryptPasswordEncoder.php.
References $client_salt, ilBcryptPhpPasswordEncoder\getCosts(), and isBcryptSupported().
Referenced by encodePassword().
Here is the call graph for this function:
Here is the caller graph for this function:| ilBcryptPasswordEncoder::encodePassword | ( | string | $raw, |
| string | $salt | ||
| ) |
Encodes the raw password.
| string | $raw | The password to encode |
| string | $salt | The salt |
Implements ilPasswordEncoder.
Definition at line 107 of file class.ilBcryptPasswordEncoder.php.
References encode(), and ilBasePasswordEncoder\isPasswordTooLong().
Referenced by ilBcryptPasswordEncoderTest\testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding(), and ilBcryptPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 215 of file class.ilBcryptPasswordEncoder.php.
References ilPasswordUtils\getBytes(), and setClientSalt().
Referenced by readClientSalt().
Here is the call graph for this function:
Here is the caller graph for this function:| ilBcryptPasswordEncoder::getClientSalt | ( | ) |
Definition at line 97 of file class.ilBcryptPasswordEncoder.php.
References $client_salt.
| ilBcryptPasswordEncoder::getClientSaltLocation | ( | ) |
Definition at line 197 of file class.ilBcryptPasswordEncoder.php.
Referenced by readClientSalt(), and storeClientSalt().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::getDataDirectory | ( | ) |
Definition at line 64 of file class.ilBcryptPasswordEncoder.php.
References $data_directory.
| ilBcryptPasswordEncoder::getName | ( | ) |
Returns a unique name/id of the concrete password encoder.
Implements ilPasswordEncoder.
Definition at line 129 of file class.ilBcryptPasswordEncoder.php.
Referenced by ilBcryptPasswordEncoderTest\testNameShouldBeBcrypt().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::isBackwardCompatibilityEnabled | ( | ) |
Definition at line 74 of file class.ilBcryptPasswordEncoder.php.
References $backward_compatibility.
|
private |
Definition at line 59 of file class.ilBcryptPasswordEncoder.php.
Referenced by encode().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::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 120 of file class.ilBcryptPasswordEncoder.php.
References check(), and ilBasePasswordEncoder\isPasswordTooLong().
Referenced by ilBcryptPasswordEncoderTest\testPasswordShouldBeCorrectlyEncodedAndVerified(), and ilBcryptPasswordEncoderTest\testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength().
Here is the call graph for this function:
Here is the caller graph for this function:| ilBcryptPasswordEncoder::isSecurityFlawIgnored | ( | ) |
Definition at line 87 of file class.ilBcryptPasswordEncoder.php.
References $is_security_flaw_ignored.
|
private |
Definition at line 202 of file class.ilBcryptPasswordEncoder.php.
References generateClientSalt(), getClientSaltLocation(), setClientSalt(), and storeClientSalt().
Referenced by __construct().
Here is the call graph for this function:
Here is the caller graph for this function:| ilBcryptPasswordEncoder::requiresReencoding | ( | string | $encoded | ) |
Returns whether the encoded password needs to be re-encoded.
Implements ilPasswordEncoder.
Definition at line 139 of file class.ilBcryptPasswordEncoder.php.
Referenced by ilBcryptPasswordEncoderTest\testEncoderDoesNotSupportReencoding().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::requiresSalt | ( | ) |
Returns whether the encoder requires a salt.
Implements ilPasswordEncoder.
Definition at line 134 of file class.ilBcryptPasswordEncoder.php.
Referenced by ilBcryptPasswordEncoderTest\testEncoderReliesOnSalts().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::setBackwardCompatibility | ( | bool | $backward_compatibility | ) |
Set the backward compatibility $2a$ instead of $2y$ for PHP 5.3.7+.
Definition at line 82 of file class.ilBcryptPasswordEncoder.php.
References $backward_compatibility.
| ilBcryptPasswordEncoder::setClientSalt | ( | ?string | $client_salt | ) |
Definition at line 102 of file class.ilBcryptPasswordEncoder.php.
References $client_salt.
Referenced by generateClientSalt(), and readClientSalt().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::setDataDirectory | ( | string | $data_directory | ) |
Definition at line 69 of file class.ilBcryptPasswordEncoder.php.
References $data_directory.
Referenced by __construct().
Here is the caller graph for this function:| ilBcryptPasswordEncoder::setIsSecurityFlawIgnored | ( | bool | $is_security_flaw_ignored | ) |
Definition at line 92 of file class.ilBcryptPasswordEncoder.php.
References $is_security_flaw_ignored.
Referenced by __construct().
Here is the caller graph for this function:
|
private |
Definition at line 222 of file class.ilBcryptPasswordEncoder.php.
References Vendor\Package\$e, $location, $message, and getClientSaltLocation().
Referenced by readClientSalt().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 37 of file class.ilBcryptPasswordEncoder.php.
Referenced by isBackwardCompatibilityEnabled(), and setBackwardCompatibility().
|
private |
Definition at line 35 of file class.ilBcryptPasswordEncoder.php.
Referenced by encode(), getClientSalt(), and setClientSalt().
|
private |
Definition at line 38 of file class.ilBcryptPasswordEncoder.php.
Referenced by getDataDirectory(), and setDataDirectory().
|
private |
Definition at line 36 of file class.ilBcryptPasswordEncoder.php.
Referenced by isSecurityFlawIgnored(), and setIsSecurityFlawIgnored().
|
private |
Definition at line 30 of file class.ilBcryptPasswordEncoder.php.
| const ilBcryptPasswordEncoder::SALT_STORAGE_FILENAME = 'pwsalt.txt' |
Definition at line 33 of file class.ilBcryptPasswordEncoder.php.
Referenced by ilBcryptPasswordEncoderTest\testInstanceCanBeCreatedAndInitializedWithClientSalt().