diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index 161d48acb..1ea06d096 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -11,6 +11,7 @@ import "core:reflect" import "base:runtime" import "base:intrinsics" import "core:math/big" +import "core:math/rand" /* Odin is a general-purpose programming language with distinct typing built @@ -2258,6 +2259,10 @@ arbitrary_precision_mathematics :: proc() { a, b, c, d, e, f, res := &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{}, &big.Int{} defer big.destroy(a, b, c, d, e, f, res) + // Set the context RNG to something that does not require + // cryptographic entropy (not supported on all targets). + context.random_generator = rand.xoshiro256_random_generator() + // How many bits should the random prime be? bits := 64 // Number of Rabin-Miller trials, -1 for automatic.