forceEntropySource

fnvoid forceEntropySource(EntropySource source) @safe

Manually set the entropy source to use for the current thread.

As a rule of thumb, this SHOULD NOT be done.

It might be useful in cases where the default entropy source — as chosen by the maintainer of the used compiler package — is unavailable on a system. Usually, EntropySource.tryAll will be the most reasonable option in such cases.

Parameters

sourceThe requested default entropy source to use for the current thread.

Examples

// Using `forceEntropySource` almost always is a bad idea.
// As a rule of thumb, this SHOULD NOT be done.
forceEntropySource(EntropySource.none);