4 require_once
'Services/Password/classes/encoders/class.ilMd5PasswordEncoder.php';
5 require_once
'Services/Password/test/ilPasswordBaseTest.php';
20 $this->assertInstanceOf(
'ilMd5PasswordEncoder', $encoder);
29 $this->assertSame(md5(
'password'), $encoder->
encodePassword(
'password',
''));
37 $this->assertTrue($encoder->
isPasswordValid(md5(
'password'),
'password',
''));
71 $this->assertFalse($encoder->
isPasswordValid(
'encoded', str_repeat(
'a', 5000),
''));
79 $this->assertEquals(
'md5', $encoder->
getName());
testNameShouldBeMd5(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated
testInstanceCanBeCreated()
requiresSalt()
{Returns whether or not the encoder requires a salt.boolean}
testEncoderDoesNotRelyOnSalts(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated
isPasswordValid($encoded, $raw, $salt)
{Checks a raw password against an encoded password.The raw password has to be injected into the encod...
testEncoderDoesNotSupportReencoding(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated
encodePassword($raw, $salt)
{Encodes the raw password.The password to encode The salt string The encoded password} ...
getName()
{Returns a unique name/id of the concrete password encoder.string}
testPasswordVerificationShouldFailIfTheRawPasswordExceedsTheSupportedLength(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated
requiresReencoding($encoded)
{Returns whether or not the a encoded password needs to be re-encoded.string boolean} ...
testPasswordCanBeVerified(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated
testPasswordShouldBeCorrectlyEncoded(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated
testExceptionIsRaisedIfThePasswordExceedsTheSupportedLengthOnEncoding(ilMd5PasswordEncoder $encoder)
testInstanceCanBeCreated ilPasswordException
assertException($exception_class)