# Module: crypto/random

Provides tools for retrieving secure randomness from browsers or Node.js

Source:
  - crypto/random.js, line 20

### Methods

#### (async, static) getRandomBigInteger(min, max) → {Promise.<module:BigInteger>}

Create a secure random BigInteger that is greater than or equal to min and less than max.

##### Parameters:

Name | Type | Description
--- | --- | ---
`min` | module:BigInteger | Lower bound, included
`max` | module:BigInteger | Upper bound, excluded

Source:
  - crypto/random.js, line 53

##### Returns:

Random BigInteger.

Type
  Promise.<module:BigInteger>

#### (static) getRandomBytes(length) → {Uint8Array}

Retrieve secure random byte array of the specified length

##### Parameters:

Name | Type | Description
--- | --- | ---
`length` | Integer | Length in bytes to generate

Source:
  - crypto/random.js, line 33

##### Returns:

Random byte array.

Type
  Uint8Array