Provides tools for retrieving secure randomness from browsers or Node.js
- Source:
 
Methods
(async, static) getRandomBigInteger(min, max) → {bigint}
Create a secure random BigInt that is greater than or equal to min and less than max.
Parameters:
| Name | Type | Description | 
|---|---|---|
min | 
            
            bigint | Lower bound, included  | 
        
max | 
            
            bigint | Upper bound, excluded  | 
        
- Source:
 
Returns:
Random BigInt.
- Type
 - bigint
 
(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:
 
Returns:
Random byte array.
- Type
 - Uint8Array