ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilBcryptPasswordEncoderTest Class Reference
+ Inheritance diagram for ilBcryptPasswordEncoderTest:
+ Collaboration diagram for ilBcryptPasswordEncoderTest:

Public Member Functions

 getTestDirectory ()
 
 setTestDirectory (vfs\vfsStreamDirectory $testDirectory)
 
 getTestDirectoryUrl ()
 
 setTestDirectoryUrl (string $testDirectoryUrl)
 
 costsProvider ()
 
 testInstanceCanBeCreated ()
 
 testCostsCanBeRetrievedWhenCostsAreSet (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testCostsCannotBeSetAboveRange (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testCostsCannotBeSetBelowRange (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testCostsCanBeSetInRange (string $costs, ilBcryptPasswordEncoder $encoder)
 @doesNotPerformAssertions @depends testInstanceCanBeCreated @dataProvider costsProvider More...
 
 testPasswordShouldBeCorrectlyEncodedAndVerified (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testEncoderReliesOnSalts (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testEncoderDoesNotSupportReencoding (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testNameShouldBeBcrypt (ilBcryptPasswordEncoder $encoder)
 @depends testInstanceCanBeCreated More...
 
 testExceptionIsRaisedIfSaltIsMissingIsOnEncoding ()
 
 testExceptionIsRaisedIfSaltIsMissingIsOnVerification ()
 
 testInstanceCanBeCreatedAndInitializedWithClientSalt ()
 
 testClientSaltIsGeneratedWhenNoClientSaltExistsYet ()
 
 testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet ()
 
 testBackwardCompatibilityCanBeRetrievedWhenBackwardCompatibilityIsSet ()
 
 testBackwardCompatibility ()
 
 testExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabled ()
 
 testNoExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabledWithIgnoredSecurityFlaw ()
 @doesNotPerformAssertions More...
 

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 ()
 

Detailed Description

Definition at line 14 of file ilBcryptPasswordEncoderTest.php.

Member Function Documentation

◆ costsProvider()

ilBcryptPasswordEncoderTest::costsProvider ( )
Returns
array

Definition at line 104 of file ilBcryptPasswordEncoderTest.php.

104 : array
105 {
106 $data = [];
107 for ($i = 4; $i <= 31; $i++) {
108 $data[sprintf("Costs: %s", (string) $i)] = [(string) $i];
109 }
110
111 return $data;
112 }
$i
Definition: metadata.php:24
$data
Definition: storeScorm.php:23

References $data, and $i.

◆ getInstanceWithConfiguredDataDirectory()

ilBcryptPasswordEncoderTest::getInstanceWithConfiguredDataDirectory ( )
private
Returns
ilBcryptPasswordEncoder
Exceptions
ilPasswordException

Definition at line 118 of file ilBcryptPasswordEncoderTest.php.

119 {
120 $encoder = new ilBcryptPasswordEncoder(array(
121 'data_directory' => $this->getTestDirectoryUrl()
122 ));
123
124 return $encoder;
125 }

References getTestDirectoryUrl().

+ Here is the call graph for this function:

◆ getTestDirectory()

ilBcryptPasswordEncoderTest::getTestDirectory ( )
Returns
vfs\vfsStreamDirectory

Definition at line 40 of file ilBcryptPasswordEncoderTest.php.

40 : vfs\vfsStreamDirectory
41 {
43 }

References $testDirectory.

◆ getTestDirectoryUrl()

ilBcryptPasswordEncoderTest::getTestDirectoryUrl ( )
Returns
string

Definition at line 56 of file ilBcryptPasswordEncoderTest.php.

References $testDirectoryUrl.

Referenced by getInstanceWithConfiguredDataDirectory(), and testInstanceCanBeCreated().

+ Here is the caller graph for this function:

◆ isVsfStreamInstalled()

ilBcryptPasswordEncoderTest::isVsfStreamInstalled ( )
private
Returns
bool

Definition at line 82 of file ilBcryptPasswordEncoderTest.php.

82 : bool
83 {
84 return class_exists('org\bovigo\vfs\vfsStreamWrapper');
85 }

Referenced by skipIfvfsStreamNotSupported().

+ Here is the caller graph for this function:

◆ setTestDirectory()

ilBcryptPasswordEncoderTest::setTestDirectory ( vfs\vfsStreamDirectory  $testDirectory)
Parameters
vfs\vfsStreamDirectory$testDirectory

Definition at line 48 of file ilBcryptPasswordEncoderTest.php.

48 : void
49 {
50 $this->testDirectory = $testDirectory;
51 }

References $testDirectory.

Referenced by skipIfvfsStreamNotSupported().

+ Here is the caller graph for this function:

◆ setTestDirectoryUrl()

ilBcryptPasswordEncoderTest::setTestDirectoryUrl ( string  $testDirectoryUrl)
Parameters
string$testDirectoryUrl

Definition at line 64 of file ilBcryptPasswordEncoderTest.php.

64 : void
65 {
66 $this->testDirectoryUrl = $testDirectoryUrl;
67 }

References $testDirectoryUrl.

Referenced by skipIfvfsStreamNotSupported().

+ Here is the caller graph for this function:

◆ skipIfPhpVersionIsNotSupported()

ilBcryptPasswordEncoderTest::skipIfPhpVersionIsNotSupported ( )
private

Definition at line 72 of file ilBcryptPasswordEncoderTest.php.

72 : void
73 {
74 if (version_compare(phpversion(), '5.3.7', '<')) {
75 $this->markTestSkipped('Requires PHP >= 5.3.7');
76 }
77 }

◆ skipIfvfsStreamNotSupported()

ilBcryptPasswordEncoderTest::skipIfvfsStreamNotSupported ( )
private

Definition at line 90 of file ilBcryptPasswordEncoderTest.php.

90 : void
91 {
92 if (!$this->isVsfStreamInstalled()) {
93 $this->markTestSkipped('Skipped test, vfsStream (http://vfs.bovigo.org) required');
94 } else {
95 vfs\vfsStream::setup();
96 $this->setTestDirectory(vfs\vfsStream::newDirectory('tests')->at(vfs\vfsStreamWrapper::getRoot()));
97 $this->setTestDirectoryUrl(vfs\vfsStream::url('root/tests'));
98 }
99 }
setTestDirectory(vfs\vfsStreamDirectory $testDirectory)
setTestDirectoryUrl(string $testDirectoryUrl)

References isVsfStreamInstalled(), setTestDirectory(), and setTestDirectoryUrl().

Referenced by testInstanceCanBeCreated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testBackwardCompatibility()

ilBcryptPasswordEncoderTest::testBackwardCompatibility ( )
Exceptions
ilPasswordException

Definition at line 360 of file ilBcryptPasswordEncoderTest.php.

360 : void
361 {
364
365 $encoder = $this->getInstanceWithConfiguredDataDirectory();
366 $encoder->setClientSalt(self::CLIENT_SALT);
367 $encoder->setBackwardCompatibility(true);
368 $encoded_password = $encoder->encodePassword(self::PASSWORD, self::PASSWORD_SALT);
369 $this->assertTrue($encoder->isPasswordValid($encoded_password, self::PASSWORD, self::PASSWORD_SALT));
370 $this->assertEquals('$2a$', substr($encoded_password, 0, 4));
371
372 $another_encoder = $this->getInstanceWithConfiguredDataDirectory();
373 $another_encoder->setClientSalt(self::CLIENT_SALT);
374 $another_encoder->setBackwardCompatibility(false);
375 $another_encoded_password = $another_encoder->encodePassword(self::PASSWORD, self::PASSWORD_SALT);
376 $this->assertEquals('$2y$', substr($another_encoded_password, 0, 4));
377 $this->assertTrue($another_encoder->isPasswordValid($encoded_password, self::PASSWORD, self::PASSWORD_SALT));
378 }

References ilBcryptPasswordEncoder\encodePassword(), ilBcryptPasswordEncoder\isPasswordValid(), ilBcryptPasswordEncoder\setBackwardCompatibility(), and ilBcryptPasswordEncoder\setClientSalt().

+ Here is the call graph for this function:

◆ testBackwardCompatibilityCanBeRetrievedWhenBackwardCompatibilityIsSet()

ilBcryptPasswordEncoderTest::testBackwardCompatibilityCanBeRetrievedWhenBackwardCompatibilityIsSet ( )
Exceptions
ilPasswordException

Definition at line 346 of file ilBcryptPasswordEncoderTest.php.

346 : void
347 {
349
350 $encoder = $this->getInstanceWithConfiguredDataDirectory();
351 $encoder->setBackwardCompatibility(true);
352 $this->assertTrue($encoder->isBackwardCompatibilityEnabled());
353 $encoder->setBackwardCompatibility(false);
354 $this->assertFalse($encoder->isBackwardCompatibilityEnabled());
355 }

References ilBcryptPasswordEncoder\isBackwardCompatibilityEnabled(), and ilBcryptPasswordEncoder\setBackwardCompatibility().

+ Here is the call graph for this function:

◆ testClientSaltIsGeneratedWhenNoClientSaltExistsYet()

ilBcryptPasswordEncoderTest::testClientSaltIsGeneratedWhenNoClientSaltExistsYet ( )
Exceptions
ilPasswordException

Definition at line 320 of file ilBcryptPasswordEncoderTest.php.

320 : void
321 {
323
324 $this->getTestDirectory()->chmod(0777);
325
326 $encoder = $this->getInstanceWithConfiguredDataDirectory();
327 $this->assertNotNull($encoder->getClientSalt());
328 }

References ilBcryptPasswordEncoder\getClientSalt().

+ Here is the call graph for this function:

◆ testCostsCanBeRetrievedWhenCostsAreSet()

ilBcryptPasswordEncoderTest::testCostsCanBeRetrievedWhenCostsAreSet ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder
Exceptions
ilPasswordException

Definition at line 164 of file ilBcryptPasswordEncoderTest.php.

164 : void
165 {
166 $expected = '04';
167
168 $encoder->setCosts($expected);
169 $this->assertEquals($expected, $encoder->getCosts());
170 }

References ilBcryptPhpPasswordEncoder\getCosts(), and ilBcryptPhpPasswordEncoder\setCosts().

+ Here is the call graph for this function:

◆ testCostsCanBeSetInRange()

ilBcryptPasswordEncoderTest::testCostsCanBeSetInRange ( string  $costs,
ilBcryptPasswordEncoder  $encoder 
)

@doesNotPerformAssertions @depends testInstanceCanBeCreated @dataProvider costsProvider

Parameters
string$costs
ilBcryptPasswordEncoder$encoder
Exceptions
ilPasswordException

Definition at line 202 of file ilBcryptPasswordEncoderTest.php.

202 : void
203 {
204 $encoder->setCosts($costs);
205 }

References ilBcryptPhpPasswordEncoder\setCosts().

+ Here is the call graph for this function:

◆ testCostsCannotBeSetAboveRange()

ilBcryptPasswordEncoderTest::testCostsCannotBeSetAboveRange ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder
Exceptions
ilPasswordException

Definition at line 177 of file ilBcryptPasswordEncoderTest.php.

177 : void
178 {
179 $this->expectException(ilPasswordException::class);
180 $encoder->setCosts('32');
181 }

References ilBcryptPhpPasswordEncoder\setCosts().

+ Here is the call graph for this function:

◆ testCostsCannotBeSetBelowRange()

ilBcryptPasswordEncoderTest::testCostsCannotBeSetBelowRange ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder
Exceptions
ilPasswordException

Definition at line 188 of file ilBcryptPasswordEncoderTest.php.

188 : void
189 {
190 $this->expectException(ilPasswordException::class);
191 $encoder->setCosts('3');
192 }

References ilBcryptPhpPasswordEncoder\setCosts().

+ Here is the call graph for this function:

◆ testEncoderDoesNotSupportReencoding()

ilBcryptPasswordEncoderTest::testEncoderDoesNotSupportReencoding ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder

Definition at line 261 of file ilBcryptPasswordEncoderTest.php.

261 : void
262 {
263 $this->assertFalse($encoder->requiresReencoding('hello'));
264 }
requiresReencoding(string $encoded)
@inheritDoc

References ilBcryptPasswordEncoder\requiresReencoding().

+ Here is the call graph for this function:

◆ testEncoderReliesOnSalts()

ilBcryptPasswordEncoderTest::testEncoderReliesOnSalts ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder

Definition at line 252 of file ilBcryptPasswordEncoderTest.php.

252 : void
253 {
254 $this->assertTrue($encoder->requiresSalt());
255 }

References ilBcryptPasswordEncoder\requiresSalt().

+ Here is the call graph for this function:

◆ testExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabled()

ilBcryptPasswordEncoderTest::testExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabled ( )
Exceptions
ilPasswordException

Definition at line 383 of file ilBcryptPasswordEncoderTest.php.

383 : void
384 {
386
387 $this->expectException(ilPasswordException::class);
388 $encoder = $this->getInstanceWithConfiguredDataDirectory();
389 $encoder->setClientSalt(self::CLIENT_SALT);
390 $encoder->setBackwardCompatibility(true);
391 $encoder->encodePassword(self::PASSWORD . chr(195), self::PASSWORD_SALT);
392 }

References ilBcryptPasswordEncoder\encodePassword(), ilBcryptPasswordEncoder\setBackwardCompatibility(), and ilBcryptPasswordEncoder\setClientSalt().

+ Here is the call graph for this function:

◆ testExceptionIsRaisedIfSaltIsMissingIsOnEncoding()

ilBcryptPasswordEncoderTest::testExceptionIsRaisedIfSaltIsMissingIsOnEncoding ( )
Exceptions
ilPasswordException

Definition at line 278 of file ilBcryptPasswordEncoderTest.php.

278 : void
279 {
281
282 $this->expectException(ilPasswordException::class);
283 $encoder = $this->getInstanceWithConfiguredDataDirectory();
284 $encoder->setClientSalt(null);
285 $encoder->setCosts(self::VALID_COSTS);
286 $encoder->encodePassword(self::PASSWORD, self::PASSWORD_SALT);
287 }

References ilBcryptPasswordEncoder\encodePassword(), ilBcryptPasswordEncoder\setClientSalt(), and ilBcryptPhpPasswordEncoder\setCosts().

+ Here is the call graph for this function:

◆ testExceptionIsRaisedIfSaltIsMissingIsOnVerification()

ilBcryptPasswordEncoderTest::testExceptionIsRaisedIfSaltIsMissingIsOnVerification ( )
Exceptions
ilPasswordException

Definition at line 292 of file ilBcryptPasswordEncoderTest.php.

292 : void
293 {
295
296 $this->expectException(ilPasswordException::class);
297 $encoder = $this->getInstanceWithConfiguredDataDirectory();
298 $encoder->setClientSalt(null);
299 $encoder->setCosts(self::VALID_COSTS);
300 $encoder->isPasswordValid('12121212', self::PASSWORD, self::PASSWORD_SALT);
301 }

References ilBcryptPasswordEncoder\isPasswordValid(), ilBcryptPasswordEncoder\setClientSalt(), and ilBcryptPhpPasswordEncoder\setCosts().

+ Here is the call graph for this function:

◆ testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding()

ilBcryptPasswordEncoderTest::testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder
Exceptions
ilPasswordException

Definition at line 228 of file ilBcryptPasswordEncoderTest.php.

230 : void {
231 $this->expectException(ilPasswordException::class);
232 $encoder->setCosts(self::VALID_COSTS);
233 $encoder->encodePassword(str_repeat('a', 5000), self::PASSWORD_SALT);
234 }
encodePassword(string $raw, string $salt)
@inheritDoc

◆ testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet()

ilBcryptPasswordEncoderTest::testExceptionIsRaisedWhenClientSaltCouldNotBeGeneratedInCaseNoClientSaltExistsYet ( )
Exceptions
ilPasswordException

Definition at line 333 of file ilBcryptPasswordEncoderTest.php.

333 : void
334 {
336
337 $this->expectException(ilPasswordException::class);
338 $this->getTestDirectory()->chmod(0000);
339
341 }

◆ testInstanceCanBeCreated()

ilBcryptPasswordEncoderTest::testInstanceCanBeCreated ( )
Returns
ilBcryptPasswordEncoder
Exceptions
ilPasswordException

Definition at line 131 of file ilBcryptPasswordEncoderTest.php.

132 {
134
135 $security_flaw_ignoring_encoder = new ilBcryptPasswordEncoder([
136 'ignore_security_flaw' => true,
137 'data_directory' => $this->getTestDirectoryUrl()
138 ]);
139 $this->assertTrue($security_flaw_ignoring_encoder->isSecurityFlawIgnored());
140
141 $security_flaw_respecting_encoder = new ilBcryptPasswordEncoder([
142 'ignore_security_flaw' => false,
143 'data_directory' => $this->getTestDirectoryUrl()
144 ]);
145 $this->assertFalse($security_flaw_respecting_encoder->isSecurityFlawIgnored());
146
147 $encoder = new ilBcryptPasswordEncoder([
148 'cost' => self::VALID_COSTS,
149 'data_directory' => $this->getTestDirectoryUrl()
150 ]);
151 $this->assertInstanceOf('ilBcryptPasswordEncoder', $encoder);
152 $this->assertEquals(self::VALID_COSTS, $encoder->getCosts());
153 $this->assertFalse($encoder->isSecurityFlawIgnored());
154 $encoder->setClientSalt(self::CLIENT_SALT);
155
156 return $encoder;
157 }

References getTestDirectoryUrl(), and skipIfvfsStreamNotSupported().

+ Here is the call graph for this function:

◆ testInstanceCanBeCreatedAndInitializedWithClientSalt()

ilBcryptPasswordEncoderTest::testInstanceCanBeCreatedAndInitializedWithClientSalt ( )
Exceptions
ilPasswordException

Definition at line 306 of file ilBcryptPasswordEncoderTest.php.

306 : void
307 {
309
310 $this->getTestDirectory()->chmod(0777);
311 vfs\vfsStream::newFile(ilBcryptPasswordEncoder::SALT_STORAGE_FILENAME)->withContent(self::CLIENT_SALT)->at($this->getTestDirectory());
312
313 $encoder = $this->getInstanceWithConfiguredDataDirectory();
314 $this->assertEquals(self::CLIENT_SALT, $encoder->getClientSalt());
315 }

References ilBcryptPasswordEncoder\getClientSalt(), and ilBcryptPasswordEncoder\SALT_STORAGE_FILENAME.

+ Here is the call graph for this function:

◆ testNameShouldBeBcrypt()

ilBcryptPasswordEncoderTest::testNameShouldBeBcrypt ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder

Definition at line 270 of file ilBcryptPasswordEncoderTest.php.

270 : void
271 {
272 $this->assertEquals('bcrypt', $encoder->getName());
273 }

References ilBcryptPasswordEncoder\getName().

+ Here is the call graph for this function:

◆ testNoExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabledWithIgnoredSecurityFlaw()

ilBcryptPasswordEncoderTest::testNoExceptionIfPasswordsContainA8BitCharacterAndBackwardCompatibilityIsEnabledWithIgnoredSecurityFlaw ( )

@doesNotPerformAssertions

Exceptions
ilPasswordException

Definition at line 398 of file ilBcryptPasswordEncoderTest.php.

398 : void
399 {
401
402 $encoder = $this->getInstanceWithConfiguredDataDirectory();
403 $encoder->setClientSalt(self::CLIENT_SALT);
404 $encoder->setBackwardCompatibility(true);
405 $encoder->setIsSecurityFlawIgnored(true);
406 $encoder->encodePassword(self::PASSWORD . chr(195), self::PASSWORD_SALT);
407 }

References ilBcryptPasswordEncoder\encodePassword(), ilBcryptPasswordEncoder\setBackwardCompatibility(), ilBcryptPasswordEncoder\setClientSalt(), and ilBcryptPasswordEncoder\setIsSecurityFlawIgnored().

+ Here is the call graph for this function:

◆ testPasswordShouldBeCorrectlyEncodedAndVerified()

ilBcryptPasswordEncoderTest::testPasswordShouldBeCorrectlyEncodedAndVerified ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder
Returns
ilBcryptPasswordEncoder
Exceptions
ilPasswordException

Definition at line 213 of file ilBcryptPasswordEncoderTest.php.

216 $encoder->setCosts(self::VALID_COSTS);
217 $encoded_password = $encoder->encodePassword(self::PASSWORD, self::PASSWORD_SALT);
218 $this->assertTrue($encoder->isPasswordValid($encoded_password, self::PASSWORD, self::PASSWORD_SALT));
219 $this->assertFalse($encoder->isPasswordValid($encoded_password, self::WRONG_PASSWORD, self::PASSWORD_SALT));
220 return $encoder;
221 }
isPasswordValid(string $encoded, string $raw, string $salt)
@inheritDoc

◆ testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength()

ilBcryptPasswordEncoderTest::testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength ( ilBcryptPasswordEncoder  $encoder)

@depends testInstanceCanBeCreated

Parameters
ilBcryptPasswordEncoder$encoder
Exceptions
ilPasswordException

Definition at line 241 of file ilBcryptPasswordEncoderTest.php.

243 : void {
244 $encoder->setCosts(self::VALID_COSTS);
245 $this->assertFalse($encoder->isPasswordValid('encoded', str_repeat('a', 5000), self::PASSWORD_SALT));
246 }

Field Documentation

◆ $testDirectory

ilBcryptPasswordEncoderTest::$testDirectory
protected

Definition at line 32 of file ilBcryptPasswordEncoderTest.php.

Referenced by getTestDirectory(), and setTestDirectory().

◆ $testDirectoryUrl

ilBcryptPasswordEncoderTest::$testDirectoryUrl
protected

Definition at line 35 of file ilBcryptPasswordEncoderTest.php.

Referenced by getTestDirectoryUrl(), and setTestDirectoryUrl().

◆ CLIENT_SALT

const ilBcryptPasswordEncoderTest::CLIENT_SALT = 'homer!12345_/'

Definition at line 26 of file ilBcryptPasswordEncoderTest.php.

◆ PASSWORD

const ilBcryptPasswordEncoderTest::PASSWORD = 'password'

Definition at line 20 of file ilBcryptPasswordEncoderTest.php.

◆ PASSWORD_SALT

const ilBcryptPasswordEncoderTest::PASSWORD_SALT = 'salt'

Definition at line 29 of file ilBcryptPasswordEncoderTest.php.

◆ VALID_COSTS

const ilBcryptPasswordEncoderTest::VALID_COSTS = '08'

Definition at line 17 of file ilBcryptPasswordEncoderTest.php.

◆ WRONG_PASSWORD

const ilBcryptPasswordEncoderTest::WRONG_PASSWORD = 'wrong_password'

Definition at line 23 of file ilBcryptPasswordEncoderTest.php.


The documentation for this class was generated from the following file: