---
title: random
---

# random

<a name="randomBytes"></a>

## randomBytes(bytes) ⇒ <code>String</code>
Uses JS-native CSPRNG to generate a specified number of bytes.
NOTE: this method throws if no PRNG is available.

**Kind**: global function  
**Returns**: <code>String</code> - ramdom hex string  

| Param | Type | Description |
| --- | --- | --- |
| bytes | <code>Number</code> | bytes number to generate |

