ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMd5PasswordEncoder Class Reference
+ Inheritance diagram for ilMd5PasswordEncoder:
+ Collaboration diagram for ilMd5PasswordEncoder:

Public Member Functions

 __construct (array $config=array())
 encodePassword ($raw, $salt)
 {Encodes the raw password.
Parameters
string$rawThe password to encode
string$saltThe salt
Returns
string The encoded password
}
 isPasswordValid ($encoded, $raw, $salt)
 {Checks a raw password against an encoded password.The raw password has to be injected into the encoder instance before.

Parameters
string$encodedAn encoded password
string$rawA raw password
string$saltThe salt
Returns
Boolean true if the password is valid, false otherwise
}
 getName ()
 {Returns a unique name/id of the concrete password encoder.
Returns
string
}
 requiresSalt ()
 {Returns whether or not the encoder requires a salt.
Returns
boolean
}
 buildForm (ilPropertyFormGUI $form)
 {Called when an encoder should build individual form parts for the user interface.
Parameters
ilPropertyFormGUI$form
}
 validateForm (ilPropertyFormGUI $form)
 {Called if an encoder should validate a request concerning business rules.
Parameters
ilPropertyFormGUI$form
Returns
boolean
}
 saveForm (ilPropertyFormGUI $form)
 {
Parameters
ilPropertyFormGUI$form
Returns
mixed
}
 onSelection ()
 {A client should call this method when the specific encoder is selected.}

Additional Inherited Members

- Data Fields inherited from ilBasePasswordEncoder
const MAX_PASSWORD_LENGTH = 4096
- Protected Member Functions inherited from ilBasePasswordEncoder
 comparePasswords ($known_string, $user_string)
 Compares two passwords.
 isPasswordTooLong ($password)
 Checks if the password is too long.

Detailed Description

Definition at line 15 of file class.ilMd5PasswordEncoder.php.

Constructor & Destructor Documentation

ilMd5PasswordEncoder::__construct ( array  $config = array())
Parameters
array$config

Definition at line 20 of file class.ilMd5PasswordEncoder.php.

{
}

Member Function Documentation

ilMd5PasswordEncoder::buildForm ( ilPropertyFormGUI  $form)

{Called when an encoder should build individual form parts for the user interface.

Parameters
ilPropertyFormGUI$form
}

Implements ilPasswordEncoderConfigurationFormAware.

Definition at line 66 of file class.ilMd5PasswordEncoder.php.

{
}
ilMd5PasswordEncoder::encodePassword (   $raw,
  $salt 
)

{Encodes the raw password.

Parameters
string$rawThe password to encode
string$saltThe salt
Returns
string The encoded password
}

Exceptions
ilPasswordException

Implements ilPasswordEncoder.

Definition at line 28 of file class.ilMd5PasswordEncoder.php.

References ilBasePasswordEncoder\isPasswordTooLong().

Referenced by isPasswordValid().

{
if($this->isPasswordTooLong($raw))
{
require_once 'Services/Password/exceptions/class.ilPasswordException.php';
throw new ilPasswordException('Invalid password.');
}
return md5($raw);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMd5PasswordEncoder::getName ( )

{Returns a unique name/id of the concrete password encoder.

Returns
string
}

Implements ilPasswordEncoder.

Definition at line 50 of file class.ilMd5PasswordEncoder.php.

{
return 'md5';
}
ilMd5PasswordEncoder::isPasswordValid (   $encoded,
  $raw,
  $salt 
)

{Checks a raw password against an encoded password.The raw password has to be injected into the encoder instance before.

Parameters
string$encodedAn encoded password
string$rawA raw password
string$saltThe salt
Returns
Boolean true if the password is valid, false otherwise
}

Implements ilPasswordEncoder.

Definition at line 42 of file class.ilMd5PasswordEncoder.php.

References ilBasePasswordEncoder\comparePasswords(), encodePassword(), and ilBasePasswordEncoder\isPasswordTooLong().

{
return !$this->isPasswordTooLong($raw) && $this->comparePasswords($encoded, $this->encodePassword($raw, $salt));
}

+ Here is the call graph for this function:

ilMd5PasswordEncoder::onSelection ( )

{A client should call this method when the specific encoder is selected.}

Implements ilPasswordEncoderConfigurationFormAware.

Definition at line 88 of file class.ilMd5PasswordEncoder.php.

{
}
ilMd5PasswordEncoder::requiresSalt ( )

{Returns whether or not the encoder requires a salt.

Returns
boolean
}

Implements ilPasswordEncoder.

Definition at line 58 of file class.ilMd5PasswordEncoder.php.

{
return false;
}
ilMd5PasswordEncoder::saveForm ( ilPropertyFormGUI  $form)

{

Parameters
ilPropertyFormGUI$form
Returns
mixed
}

Implements ilPasswordEncoderConfigurationFormAware.

Definition at line 81 of file class.ilMd5PasswordEncoder.php.

{
}
ilMd5PasswordEncoder::validateForm ( ilPropertyFormGUI  $form)

{Called if an encoder should validate a request concerning business rules.

Parameters
ilPropertyFormGUI$form
Returns
boolean
}

Implements ilPasswordEncoderConfigurationFormAware.

Definition at line 73 of file class.ilMd5PasswordEncoder.php.

{
return true;
}

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