UNPKG

@ethersproject/random

Version:

Random utility functions for ethers.

8 lines (5 loc) 208 B
import { randomBytes as _randomBytes } from "crypto"; import { arrayify } from "@ethersproject/bytes"; export function randomBytes(length: number): Uint8Array { return arrayify(_randomBytes(length)); }