# Module: crypto/hash

Provides an interface to hashing functions available in Node.js or external libraries.

Source:
  - crypto/hash/index.js, line 1
See:
  - asmCrypto
  - hash.js

### Members

#### (static) md5

Source:
  - crypto/hash/index.js, line 61
See:
  - module:md5

### Methods

#### (static) digest(algo, data) → {Promise.<Uint8Array>}

Create a hash on the specified data using the specified algorithm

##### Parameters:

Name | Type | Description
--- | --- | ---
`algo` | module:enums.hash | Hash algorithm type (see RFC 4880 9.4)
`data` | Uint8Array | Data to be hashed

Source:
  - crypto/hash/index.js, line 77

##### Returns:

Hash value.

Type
  Promise.<Uint8Array>

#### (static) getHashByteLength(algo) → {Integer}

Returns the hash size in bytes of the specified hash algorithm type

##### Parameters:

Name | Type | Description
--- | --- | ---
`algo` | module:enums.hash | Hash algorithm type (See RFC 4880 9.4)

Source:
  - crypto/hash/index.js, line 107

##### Returns:

Size in bytes of the resulting hash.

Type
  Integer