nonce 0.1.0

Dart native js
Flutter Android iOS web

A utility class with a single method to generate random alphanumeric strings.

nonce #

pub package

A utility class with a single method to generate alphanumeric nonces.

Usage #

import 'package:nonce/nonce.dart';

nonce contains a single utility class, [Nonce], with one method: String generate([int length = 32]).

generate() has an 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.

0
likes
100
pub points
74%
popularity

Publisher

jamesalex.dev

A utility class with a single method to generate random alphanumeric strings.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

More

Packages that depend on nonce