crypto-random-bigint
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Crypto Random BigInt

Generate a cryptographically-random BigInt with the given number of bits of entropy.

It's pretty darn fast, tiny, and it works everywhere. It's like a purer version of nanoid.

Install

npm install crypto-random-bigint

Usage

import random from 'crypto-random-bigint';

// Let's get some random BigInts

random ( 8 ); // => 132n
random ( 16 ); // => 54279n
random ( 32 ); // => 3564608120n
random ( 64 ); // => 15255558299082773463n
random ( 128 ); // => 102272854662000556975733753112255674405n

License

MIT © Fabio Spampinato

Package Sidebar

Install

npm i crypto-random-bigint

Weekly Downloads

2,182

Version

2.1.1

License

MIT

Unpacked Size

4.49 kB

Total Files

5

Last publish

Collaborators

  • fabiospampinato