Uuid constructor
const
Uuid({
- GlobalOptions? goptions,
Creates a new instance of the Uuid class.
Optionally you can pass in a GlobalOptions
object to set global options
for all UUID generation.
GlobalOptions.rng
is a RNG
class that returns a list of random bytes.
Defaults rng function is UuidUtil.cryptoRNG
Example: Using MathRNG globally
var uuid = Uuid(options: {
'grng': UuidUtil.mathRNG
})
// Generate a v4 (random) id that will use cryptRNG for its rng function
uuid.v4();
Implementation
const Uuid({this.goptions});