Skip to content

chancehudson/randomf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

randomf CircleCI

Generate strong random numbers in a finite field.

Uses node:crypto in browser, and webcrypto in browser (if available). If webcrypto is not available in browser optionally falls back to Math.random.

Usage

npm i randomf

import randomf from 'randomf'

// The cardinality of the field
const F = 2n ** 256n

// Returns a strong random value
const v = randomf(F)

License

MIT

About

Random numbers in a finite field

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published