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()
  2. UUID randomUUID(RNG randomGen)
    randomUUID
    (
    RNG
    )
    (
    ref RNG randomGen
    )

Parameters

randomGen RNG

uniform RNG

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