scryptHash
scryptHash
scryptHash
I encode passwords using scrypt, which was designed to be far stronger than bcrypt.
Metadata
| Instantiating |
encode()
Convert a clear password to its encoded value
Arguments
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
| password | string | Yes | Input password |
getHashParams()
Retrieve the hash params from a hashed string
Arguments
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
| hashedPassword | string | Yes | Previously encoded password string |
init()
constructor
Arguments
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
| cryptLib | any | No | Interface to 3rd-party Java crypto libraries |
isAvailable()
Is the hashing agorithm available in this environment?
Arguments
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
| None | |||||
matchesHashFormat()
Does the string match the format for this hash?
Arguments
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
| input | string | Yes | String that may be a password hash |
passwordMatch()
Compare a plain password against an encoded string
Arguments
| Name | Type | Required | Default | Options | Description |
|---|---|---|---|---|---|
| password | string | Yes | Input password | ||
| hashedPassword | string | Yes | Previously encoded password string | ||
| bCheckHashStrength | boolean | No | false | If true, the hash strength of the hashed password must also match those generated by encode() |