Class Index | File Index

Classes


Namespace hashing

Hash functions
Defined in: hashing.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 

Hash functions and hashing.

Field Summary
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 Summary
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)
Namespace Detail
hashing

Hash functions and hashing.


Author: Anonymized.
Requires:
encoding
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.

Documentation generated by JsDoc Toolkit on Mon, 26 Nov 2012 17:47:46 UTC