Method | Description | |
---|---|---|
hash ( |
Hash then encrypt a password | |
needsRehash ( string $stored, EncryptionKey $secretKey, string $level = KeyFactory::INTERACTIVE ) : boolean | Is this password hash stale? | |
verify ( |
Decrypt then verify a password |
Method | Description | |
---|---|---|
getConfig ( string $stored ) : SymmetricConfig | Get the configuration for this version of halite |
public static hash ( |
||
$password | The user's password | |
$secretKey | EncryptionKey | The master key for all passwords |
$level | string | The security level for this password |
return | string | An encrypted hash to store |
public static needsRehash ( string $stored, EncryptionKey $secretKey, string $level = KeyFactory::INTERACTIVE ) : boolean | ||
$stored | string | Encrypted password hash |
$secretKey | EncryptionKey | The master key for all passwords |
$level | string | The security level for this password |
return | boolean | Do we need to regenerate the hash or ciphertext? |