Methods
(inner) generateSecureRandomBytesInBase64(size) → {string}
Generate secure random bytes of given size
and return value in Base64.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | in bytes |
- Source:
Returns:
random bytes in base64
- Type
- string
(inner) generateSecureRandomBytesInHex(size) → {string}
Generate secure random bytes of given size
and return value in hex.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | in bytes |
- Source:
Returns:
random bytes in hex
- Type
- string
(inner) generateSecureSaltInBase64() → {base64}
Generate a secure random salt of schema defined length
(256-bits) and return value in Base64.
- Source:
Returns:
32-byte salt in base64
- Type
- base64
(inner) generateSecureSaltInHex() → {hex}
Generate a secure random salt of schema defined length
(256-bits) and return value in hex.
- Source:
Returns:
32-byte salt in hex
- Type
- hex
(inner) hashInput(input) → {digest}
Hash a variable number of arguments concatenated
with the SHA-256 crypto standard hash function and
return result.
Parameters:
Name | Type | Description |
---|---|---|
input |
any |
- Source:
Returns:
Sha-256 hash
- Type
- digest
(inner) hashPassWithSaltInBase64(password, secureSalt) → {base64}
Hashes the given password and salt concatenated with the
SHA-256 crypto standard hash function and returns the value in Base64.
Parameters:
Name | Type | Description |
---|---|---|
password |
string | |
secureSalt |
base64 |
- Source:
Returns:
32-byte hash in Base64
- Type
- base64
(inner) hashPassWithSaltInHex(password, secureSalt) → {hex}
Hashes the given password and salt concatenated with the
SHA-256 crypto standard hash function and returns the value in hex.
Parameters:
Name | Type | Description |
---|---|---|
password |
string | |
secureSalt |
hex |
- Source:
Returns:
32-byte hash in hex
- Type
- hex
(inner) hashVarargInBase64(…args) → {digest}
Hash a variable number of arguments concatenated
with the SHA-256 crypto standard hash function and
return result in Base64.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
any |
<repeatable> |
- Source:
Returns:
Sha-256 hash in Base64
- Type
- digest
(inner) hashVarargInHex(…args) → {digest}
Hash a variable number of arguments concatenated
with the SHA-256 crypto standard hash function and
return result in hex.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
any |
<repeatable> |
- Source:
Returns:
Sha-256 hash in hex
- Type
- digest