Skip to main content

Module custom_entropy

Module custom_entropy 

Source
Expand description

Custom Entropy Source System for no_std and WASM Environments

This module provides a secure, callback-based entropy source system that allows developers to plug in custom entropy sources for no_std and WASM environments. The system uses function pointers and thread-local storage to avoid global state while maintaining security and performance.

Structs§

CustomEntropyConfig
Custom entropy source configuration
CustomEntropySource
Custom entropy source registration
EntropyContext
Context data for entropy callbacks
ThreadEntropyRegistry
Thread-local entropy source registry

Enums§

EntropyQuality
Entropy source quality levels

Functions§

generate_custom_entropy
Generate entropy using the registered custom source
get_entropy_source_info
Get information about the registered entropy source
has_custom_entropy_source
Check if a custom entropy source is registered
register_custom_entropy_source
Register a custom entropy source for the current thread
unregister_custom_entropy_source
Unregister the current custom entropy source

Type Aliases§

EntropyCallback
Function pointer type for custom entropy sources