The OpenD Programming Language

randomUUID

This function generates a random number based UUID from a random number generator.

This function is not supported at compile time.

  1. UUID randomUUID()
    @safe
    randomUUID
    ()
  2. UUID randomUUID(RNG randomGen)

Examples

import std.random : Xorshift192, unpredictableSeed;

//simple call
auto uuid = randomUUID();

//provide a custom RNG. Must be seeded manually.
Xorshift192 gen;

gen.seed(unpredictableSeed);
auto uuid3 = randomUUID(gen);

See Also

Meta