rng 1.0.0 copy "rng: ^1.0.0" to clipboard
rng: ^1.0.0 copied to clipboard

A library to generate very large random numbers (BigInt). Includes various generation techniques and sources of randomness for easy customization.

example/rng_example.dart

import 'package:rng/rng.dart';

void main() {
  /// Initialize the main object
  Rng rng = Rng();

  /// Get a random BigInt using a particular technique eg. byte-filled
  /// for a specified bit length of 256
  BigInt randomNumber1 = rng.getByteFilledBigInt(bitLength: 256);

  /// Do stuff with the number
  print(randomNumber1);

  /// Get a random BigInt using a particular technique eg. byte-filled
  /// for a specified bit length of 512
  BigInt randomNumber2 = rng.getByteFilledBigInt(bitLength: 512);

  /// Do stuff with the number
  print(randomNumber2);
}
4
likes
160
pub points
21%
popularity

Publisher

verified publisher0xdir.com

A library to generate very large random numbers (BigInt). Includes various generation techniques and sources of randomness for easy customization.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on rng