Constructor
new SeaSalt_Tools(configopt)
Parameters
config:Object
(optional)
User-provided configuration data
Properties
config:Object
Configuration data
config.minimumEntropy:number
= 6
(optional)
config.minimumKeyLength:number
= 6
(optional)
config.minimumStrength:number
= 1
(optional)
config.logger:function
= config.log
(optional)
Minimum password entropy required
Minimum password character length
Minimum password strength
Logging handler
Source: seasalt.js, line 909
Methods
passwordStrength(password):number
Calculate the strength of a supplied password
Parameters
password:string
Password to check
Returns
- Type
- :number
Returns the calculated strength of the provided password.
Source: seasalt.js, line 974
randomString(lengthopt, alphaopt, capsopt, numericopt, symbolsopt):string
Generates a random string of any length with a variable character pool.
Parameters
length:number
= 32
(optional)
alpha:boolean
= true
(optional)
caps:boolean
= true
(optional)
numeric:boolean
= true
(optional)
symbols:boolean
= true
(optional)
Length of string to generate
Include lower case alphabet in the pool
Include upper case alphabet in the pool
Include numbers in the pool
Include symbols in the pool
Returns
- Type
- :string
Returns a random string from the character pool.
Source: seasalt.js, line 941