crypt.derive
Documentation of Synapse Z crypt.derive library
crypt.derive.key
string crypt.derive.key(result_size: number, key: string, id: <string/number>, context: string?)
if id is a number then context is required to perform libsodium kfd key derivation
else performs a blake2b_sha512 with the specified key and id
crypt.derive.password
string crypt.derive.password(result_size: number, password: string, salt: string, type: number)
uses libsodium pwhash
type can be any of following:
TypeName | TypeValue | Description |
---|---|---|
Interactive | 0 | Fastest type of pwhash |
Moderate | 1 | Second fastest type of pwhash |
Sensitive | 2 | Slowest type of pwhash, used for advanced password hashing |