Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including safe-rng with all npm packages installed. Try it out:

var safeRng = require("safe-rng")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

safe-rng v1.0.4

SafeRNG is a JavaScript library for generating provably fair numbers in online gambling and betting applications. It provides a set of functions for generating integers, floats, and dice rolls, as well as utility functions for combining seeds and hashing data using the SHA512 algorithm. SafeRNG uses a combination of client seed, server seed, and nonce to ensure that the generated numbers are transparent and fair. It's simple to use and integrates easily into existing applications. SafeRNG is released under the MIT license and is free for personal and commercial use.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free