UNPKG

n-digit-token

Version:

Cryptographically secure pseudo-random token of n digits

10 lines (9 loc) 352 B
import type { Options } from './types'; /** * Generates a cryptographically secure pseudo random token string of given length. * This implementation avoids modulo bias. * @param {number} length * @param {Options} [options] * @return {bigint} token */ export declare const generateWithoutModuloBias: (length: number, options?: Options) => bigint;