UNPKG

randomcryp

Version:

A cryptographically secure, feature rich, zero dependency and browser friendly random number generator library.

8 lines (7 loc) 405 B
/** * Generates a random hex string of the specified length. * @param {number} [length=8] - The length of the hex string to generate. Default is `8`. * @param {boolean} [prefix=false] - If `true`, the hex string will be prefixed with `"0x"`. Default `false`. * @returns {string} A random hex string of the specified length. */ export declare const hex: (length?: number, prefix?: boolean) => string;