Skip to content

ludus::foundation::identity::EntropySource

Ludus Wiki · API overview · Browse API

Struct

Caller-supplied source of cryptographically secure random bytes.
Platform and tool owners provide adapters over the operating system's entropy interface; tests inject controlled bytes. FoundationIdentity performs no entropy acquisition of its own and has no fallback source.

Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp

#include <ludus/foundation/identity/uuid.hpp>
struct ludus::foundation::identity::EntropySource final

Fields

FillBytesOrNull

bool(*) ludus::foundation::identity::EntropySource::FillBytesOrNull(void *contextOrNull, uint8 *outBytes, usize size) noexcept(void *contextOrNull, uint8 *outBytes, usize size) noexcept = nullptr
Fill size bytes at outBytes; return false when entropy is unavailable. Called on the generating thread; must not throw. Null means unavailable.

Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp

ContextOrNull

void* ludus::foundation::identity::EntropySource::ContextOrNull = nullptr
Opaque state passed to FillBytesOrNull; owned by the caller and kept alive across the call.

Declared in modules/foundation/identity/include/ludus/foundation/identity/uuid.hpp