A class to hash and verify passwords using verious methods
| category | OSS |
|---|---|
| package | OSS_Auth |
| copyright | Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland |
| license | New BSD License |
hash(string $pw, array $config) : string
The parameters expected in $config are:
pwhash - a hashing method from the HASH_ constants in this classhash_cost - a cost parameter for certain hashing functions - e.g. bcrypt (defaults to 9)stringThe plaintext password to hash
arrayThe resources.auth.oss array from application.ini
\OSS_Exception |
|---|
stringThe hashed passwordverify(string $pwplain, string $pwhash, array $config) : bool
| see | \global\hash() |
|---|
stringThe plaintext password
stringThe hashed password to use for verification
arrayThe resources.auth.oss array from application.ini
\OSS_Exception |
|---|
boolTrue if the passwords matchHASH_BCRYPT
HASH_PLAIN
HASH_PLAINTEXT
HASH_UNKNOWN