4 require_once
'Services/Password/interfaces/interface.ilPasswordEncoder.php';
30 $known_string .= chr(0);
31 $user_string .= chr(0);
33 $known_string_length = strlen($known_string);
34 $user_string_length = strlen($user_string);
37 $result = $known_string_length - $user_string_length;
41 for (
$i = 0;
$i < $user_string_length;
$i++) {
45 $result |= (ord($known_string[
$i % $known_string_length]) ^ ord($user_string[
$i]));
59 return strlen(
$password) > self::MAX_PASSWORD_LENGTH;
comparePasswords($known_string, $user_string)
Compares two passwords.
requiresSalt()
{Returns whether or not the encoder requires a salt.boolean}
isSupportedByRuntime()
{Returns whether or not the encoder is supported by the runtime (PHP, HHVM, ...)boolean} ...
const MAX_PASSWORD_LENGTH
requiresReencoding($encoded)
{Returns whether or not the a encoded password needs to be re-encoded.string boolean} ...
isPasswordTooLong($password)
Checks if the password is too long.