Namespace hashing
Hash functions
Defined in: hashing.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Hash functions and hashing. |
Field Attributes | Field Name and Description |
---|---|
<static> |
hashing.hmac_hash
The hash function to use for HMAC, hashing.sha256 by default
|
<static> |
hashing.sha1
SHA1 hash function wrapper.
|
<static> |
hashing.sha256
SHA-256 hash function wrapper.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
hashing.HMAC(key, msg)
Hash-based message authentication code
|
<static> |
hashing.SHA1(m)
SHA1 helper function (hex output)
|
<static> |
hashing.SHA256(m)
SHA-256 helper function (hex output)
|
Field Detail
<static>
hashing.hmac_hash
The hash function to use for HMAC, hashing.sha256 by default
<static>
hashing.sha1
SHA1 hash function wrapper. This object can be used
to configure primitives that rely on a hash function,
for instance rsa.pss_hash = hashing.sha1
<static>
hashing.sha256
SHA-256 hash function wrapper. This object can be used
to configure primitives that rely on a hash function,
for instance hashing.hmac_hash = hashing.sha256
Method Detail
<static>
{string}
hashing.HMAC(key, msg)
Hash-based message authentication code
- Parameters:
- {string} key
- key of the authentication
- {string} msg
- message to authenticate
- Returns:
- {string} authentication code, as an hex string.
<static>
{string}
hashing.SHA1(m)
SHA1 helper function (hex output)
- Parameters:
- {string} m
- ASCII message to digest with SHA1.
- Returns:
- {string} Hex string representing the hash.
<static>
{string}
hashing.SHA256(m)
SHA-256 helper function (hex output)
- Parameters:
- {string} m
- ASCII message to digest with SHA-256.
- Returns:
- {string} Hex string representing the hash.