class PasswordEncryptor_MySQLOldPassword extends PasswordEncryptor

Uses MySQL's OLD_PASSWORD encyrption. Requires an active DB connection.

Methods

static Array
get_encryptors()

No description

create_for_algorithm(String $algorithm)

No description

String
encrypt(String $password, String $salt = null, Member $member = null)

Return a string value stored in the {@link Member->Password} property.

String
salt(String $password, Member $member = null)

Return a string value stored in the {@link Member->Salt} property.

check($hash, $password, $salt = null, $member = null)

This usually just returns a strict string comparison, but is necessary for retain compatibility with password hashed with flawed algorithms - see {@link PasswordEncryptor_LegacyPHPHash} and {@link PasswordEncryptor_Blowfish}

Details

in PasswordEncryptor at line 25
static Array get_encryptors()

Return Value

Array Map of encryptor code to the used class.

in PasswordEncryptor at line 34
static PasswordEncryptor create_for_algorithm(String $algorithm)

Parameters

String $algorithm

Return Value

PasswordEncryptor

Exceptions

PasswordEncryptor_NotFoundException

at line 352
String encrypt(String $password, String $salt = null, Member $member = null)

Return a string value stored in the {@link Member->Password} property.

The password should be hashed with {@link salt()} if applicable.

Parameters

String $password Cleartext password to be hashed
String $salt (Optional)
Member $member (Optional)

Return Value

String Maximum of 512 characters.

at line 356
String salt(String $password, Member $member = null)

Return a string value stored in the {@link Member->Salt} property.

Parameters

String $password Cleartext password
Member $member (Optional)

Return Value

String Maximum of 50 characters

in PasswordEncryptor at line 89
check($hash, $password, $salt = null, $member = null)

This usually just returns a strict string comparison, but is necessary for retain compatibility with password hashed with flawed algorithms - see {@link PasswordEncryptor_LegacyPHPHash} and {@link PasswordEncryptor_Blowfish}

Parameters

$hash
$password
$salt
$member