ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPasswordEncoder Interface Reference
+ Inheritance diagram for ilPasswordEncoder:
+ Collaboration diagram for ilPasswordEncoder:

Public Member Functions

 encodePassword (string $raw, string $salt)
 Encodes the raw password. More...
 
 isPasswordValid (string $encoded, string $raw, string $salt)
 Checks a raw password against an encoded password. More...
 
 getName ()
 Returns a unique name/id of the concrete password encoder. More...
 
 requiresSalt ()
 Returns whether the encoder requires a salt. More...
 
 requiresReencoding (string $encoded)
 Returns whether the encoded password needs to be re-encoded. More...
 
 isSupportedByRuntime ()
 Returns whether the encoder is supported by the runtime (PHP, HHVM, ...) More...
 

Detailed Description

Definition at line 26 of file interface.ilPasswordEncoder.php.

Member Function Documentation

◆ encodePassword()

ilPasswordEncoder::encodePassword ( string  $raw,
string  $salt 
)

Encodes the raw password.

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

Implemented in ilBcryptPasswordEncoder, ilBcryptPhpPasswordEncoder, and ilMd5PasswordEncoder.

◆ getName()

ilPasswordEncoder::getName ( )

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

Implemented in ilBcryptPasswordEncoder, ilBcryptPhpPasswordEncoder, and ilMd5PasswordEncoder.

◆ isPasswordValid()

ilPasswordEncoder::isPasswordValid ( string  $encoded,
string  $raw,
string  $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, may be empty
Returns
Boolean true if the password is valid, false otherwise

Implemented in ilBcryptPasswordEncoder, ilBcryptPhpPasswordEncoder, and ilMd5PasswordEncoder.

◆ isSupportedByRuntime()

ilPasswordEncoder::isSupportedByRuntime ( )

Returns whether the encoder is supported by the runtime (PHP, HHVM, ...)

Implemented in ilBasePasswordEncoder.

◆ requiresReencoding()

ilPasswordEncoder::requiresReencoding ( string  $encoded)

Returns whether the encoded password needs to be re-encoded.

Implemented in ilBcryptPasswordEncoder, ilBcryptPhpPasswordEncoder, and ilBasePasswordEncoder.

◆ requiresSalt()

ilPasswordEncoder::requiresSalt ( )

Returns whether the encoder requires a salt.

Implemented in ilBcryptPasswordEncoder, and ilBasePasswordEncoder.


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