PasswordEncryptor_PBKDF2
class PasswordEncryptor_PBKDF2 extends PasswordEncryptor_PHPHash (View source)
Provides Password-Based Key Derivation Function hashing for passwords, using the provided algorithm (default is SHA512), which is NZISM compliant under version 3.2 section 17.2.
Properties
protected | $algorithm | from PasswordEncryptor_PHPHash | ||
protected | int | $iterations | The number of internal iterations for hash_pbkdf2() to perform for the derivation. Please note that if you change this from the default value you will break existing hashes stored in the database, so these would need to be regenerated. |
Methods
Return a string value stored in the Member->Salt property.
This usually just returns a strict string comparison, but is necessary for retain compatibility with password hashed with flawed algorithms - see PasswordEncryptor_LegacyPHPHash and PasswordEncryptor_Blowfish
Details
static array
get_encryptors()
No description
static PasswordEncryptor
create_for_algorithm(string $algorithm)
No description
string
encrypt(string $password, string $salt = null, Member $member = null)
Return a string value stored in the Member->Password property.
The password should be hashed with salt() if applicable.
string
salt(string $password, Member $member = null)
Return a string value stored in the 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 PasswordEncryptor_LegacyPHPHash and PasswordEncryptor_Blowfish
__construct(string $algorithm, int $iterations = null)
No description
string
getAlgorithm()
No description
int
getIterations()
No description