nonce 0.2.0 copy "nonce: ^0.2.0" to clipboard
nonce: ^0.2.0 copied to clipboard

outdated

Nonce contains a static generator that generates random alphanumeric strings, and can be constructed as an object containing a generated string.

nonce #

pub package

[Nonce] contains a static generator that generates random alphanumeric strings, and can be constructed as an object containing a generated string.

Usage #

import 'package:nonce/nonce.dart';

Generator #

The static method [generate] can be used to generate random alphanumeric strings; it has one optional parameter, [length], to specify the length of the generated string.

print(Nonce.generate()); // Osp54up7WU6P3U97Jz92p9j892n9LP7z
print(Nonce.generate(64)); // LDwpr1H74qm894jbd15Lj63wF5RUL07r4L9XOY7zVMz7fLbBCXa68Y6oPw0N9XgV

generate() does not rely on Base64 encoding, instead it generates ASCII character codes directly.

Constructors #

[Nonce]'s default constructor constructs a [Nonce] of the specified length; 32 characters by default.

Nonce();
Nonce(64);

unique #

[Nonce]'s [unique] constructor references a global set of every nonce generated by it, and ensures that every nonce returned by it is unique.

Nonce.unique();
Nonce.unique(64);
11
likes
0
pub points
90%
popularity

Publisher

verified publisherjamesalex.dev

Nonce contains a static generator that generates random alphanumeric strings, and can be constructed as an object containing a generated string.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on nonce