ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
Data Fields | |
const | VALID_COSTS = '08' |
const | PASSWORD = 'password' |
const | WRONG_PASSWORD = 'wrong_password' |
const | CLIENT_SALT = 'homer!12345_/' |
const | PASSWORD_SALT = 'salt' |
Protected Attributes | |
$testDirectory | |
$testDirectoryUrl | |
Private Member Functions | |
skipIfPhpVersionIsNotSupported () | |
isVsfStreamInstalled () | |
skipIfvfsStreamNotSupported () | |
getInstanceWithConfiguredDataDirectory () | |
Definition at line 14 of file ilBcryptPasswordEncoderTest.php.
ilBcryptPasswordEncoderTest::costsProvider | ( | ) |
Definition at line 104 of file ilBcryptPasswordEncoderTest.php.
|
private |
ilPasswordException |
Definition at line 118 of file ilBcryptPasswordEncoderTest.php.
References getTestDirectoryUrl().
Referenced by testBackwardCompatibility(), testBackwardCompatibilityCanBeRetrievedWhenBackwardCompatibilityIsSet(), testClientSaltIsGeneratedWhenNoClientSaltExistsYet(), testExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabled(), testExceptionIsRaisedIfSaltIsMissingIsOnEncoding(), testExceptionIsRaisedIfSaltIsMissingIsOnVerification(), testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet(), testInstanceCanBeCreatedAndInitializedWithClientSalt(), and testNoExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabledWithIgnoredSecurityFlaw().
ilBcryptPasswordEncoderTest::getTestDirectory | ( | ) |
Definition at line 40 of file ilBcryptPasswordEncoderTest.php.
References $testDirectory.
Referenced by testClientSaltIsGeneratedWhenNoClientSaltExistsYet(), testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet(), and testInstanceCanBeCreatedAndInitializedWithClientSalt().
ilBcryptPasswordEncoderTest::getTestDirectoryUrl | ( | ) |
Definition at line 56 of file ilBcryptPasswordEncoderTest.php.
References $testDirectoryUrl.
Referenced by getInstanceWithConfiguredDataDirectory(), and testInstanceCanBeCreated().
|
private |
Definition at line 82 of file ilBcryptPasswordEncoderTest.php.
Referenced by skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::setTestDirectory | ( | vfs\vfsStreamDirectory | $testDirectory | ) |
vfs\vfsStreamDirectory | $testDirectory |
Definition at line 48 of file ilBcryptPasswordEncoderTest.php.
References $testDirectory.
Referenced by skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::setTestDirectoryUrl | ( | string | $testDirectoryUrl | ) |
string | $testDirectoryUrl |
Definition at line 64 of file ilBcryptPasswordEncoderTest.php.
References $testDirectoryUrl.
Referenced by skipIfvfsStreamNotSupported().
|
private |
Definition at line 72 of file ilBcryptPasswordEncoderTest.php.
Referenced by testBackwardCompatibility().
|
private |
Definition at line 90 of file ilBcryptPasswordEncoderTest.php.
References isVsfStreamInstalled(), setTestDirectory(), and setTestDirectoryUrl().
Referenced by testBackwardCompatibility(), testBackwardCompatibilityCanBeRetrievedWhenBackwardCompatibilityIsSet(), testClientSaltIsGeneratedWhenNoClientSaltExistsYet(), testExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabled(), testExceptionIsRaisedIfSaltIsMissingIsOnEncoding(), testExceptionIsRaisedIfSaltIsMissingIsOnVerification(), testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet(), testInstanceCanBeCreated(), testInstanceCanBeCreatedAndInitializedWithClientSalt(), and testNoExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabledWithIgnoredSecurityFlaw().
ilBcryptPasswordEncoderTest::testBackwardCompatibility | ( | ) |
ilPasswordException |
Definition at line 360 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), skipIfPhpVersionIsNotSupported(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testBackwardCompatibilityCanBeRetrievedWhenBackwardCompatibilityIsSet | ( | ) |
ilPasswordException |
Definition at line 346 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testClientSaltIsGeneratedWhenNoClientSaltExistsYet | ( | ) |
ilPasswordException |
Definition at line 320 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), getTestDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testCostsCanBeRetrievedWhenCostsAreSet | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 164 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPhpPasswordEncoder\getCosts(), and ilBcryptPhpPasswordEncoder\setCosts().
ilBcryptPasswordEncoderTest::testCostsCanBeSetInRange | ( | string | $costs, |
ilBcryptPasswordEncoder | $encoder | ||
) |
testInstanceCanBeCreated costsProvider
string | $costs | |
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 202 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPhpPasswordEncoder\setCosts().
ilBcryptPasswordEncoderTest::testCostsCannotBeSetAboveRange | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 177 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPhpPasswordEncoder\setCosts().
ilBcryptPasswordEncoderTest::testCostsCannotBeSetBelowRange | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 188 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPhpPasswordEncoder\setCosts().
ilBcryptPasswordEncoderTest::testEncoderDoesNotSupportReencoding | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
Definition at line 261 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPasswordEncoder\requiresReencoding().
ilBcryptPasswordEncoderTest::testEncoderReliesOnSalts | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
Definition at line 252 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPasswordEncoder\requiresSalt().
ilBcryptPasswordEncoderTest::testExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabled | ( | ) |
ilPasswordException |
Definition at line 383 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testExceptionIsRaisedIfSaltIsMissingIsOnEncoding | ( | ) |
ilPasswordException |
Definition at line 278 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testExceptionIsRaisedIfSaltIsMissingIsOnVerification | ( | ) |
ilPasswordException |
Definition at line 292 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 228 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPasswordEncoder\encodePassword(), and ilBcryptPhpPasswordEncoder\setCosts().
ilBcryptPasswordEncoderTest::testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet | ( | ) |
ilPasswordException |
Definition at line 333 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), getTestDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testInstanceCanBeCreated | ( | ) |
ilPasswordException |
Definition at line 131 of file ilBcryptPasswordEncoderTest.php.
References getTestDirectoryUrl(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testInstanceCanBeCreatedAndInitializedWithClientSalt | ( | ) |
ilPasswordException |
Definition at line 306 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), getTestDirectory(), ilBcryptPasswordEncoder\SALT_STORAGE_FILENAME, and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testNameShouldBeBcrypt | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
Definition at line 270 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPasswordEncoder\getName().
ilBcryptPasswordEncoderTest::testNoExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabledWithIgnoredSecurityFlaw | ( | ) |
ilPasswordException |
Definition at line 398 of file ilBcryptPasswordEncoderTest.php.
References getInstanceWithConfiguredDataDirectory(), and skipIfvfsStreamNotSupported().
ilBcryptPasswordEncoderTest::testPasswordShouldBeCorrectlyEncodedAndVerified | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 213 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPasswordEncoder\encodePassword(), ilBcryptPasswordEncoder\isPasswordValid(), and ilBcryptPhpPasswordEncoder\setCosts().
ilBcryptPasswordEncoderTest::testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength | ( | ilBcryptPasswordEncoder | $encoder | ) |
testInstanceCanBeCreated
ilBcryptPasswordEncoder | $encoder |
ilPasswordException |
Definition at line 241 of file ilBcryptPasswordEncoderTest.php.
References ilBcryptPasswordEncoder\isPasswordValid(), and ilBcryptPhpPasswordEncoder\setCosts().
|
protected |
Definition at line 32 of file ilBcryptPasswordEncoderTest.php.
Referenced by getTestDirectory(), and setTestDirectory().
|
protected |
Definition at line 35 of file ilBcryptPasswordEncoderTest.php.
Referenced by getTestDirectoryUrl(), and setTestDirectoryUrl().
const ilBcryptPasswordEncoderTest::CLIENT_SALT = 'homer!12345_/' |
Definition at line 26 of file ilBcryptPasswordEncoderTest.php.
const ilBcryptPasswordEncoderTest::PASSWORD = 'password' |
Definition at line 20 of file ilBcryptPasswordEncoderTest.php.
const ilBcryptPasswordEncoderTest::PASSWORD_SALT = 'salt' |
Definition at line 29 of file ilBcryptPasswordEncoderTest.php.
const ilBcryptPasswordEncoderTest::VALID_COSTS = '08' |
Definition at line 17 of file ilBcryptPasswordEncoderTest.php.
const ilBcryptPasswordEncoderTest::WRONG_PASSWORD = 'wrong_password' |
Definition at line 23 of file ilBcryptPasswordEncoderTest.php.