pub trait TryCryptoRng: TryRngCore { }
Expand description
A marker trait over TryRngCore
for securely unpredictable RNGs
This trait is like CryptoRng
but for the trait TryRngCore
.
This marker trait indicates that the implementing generator is intended, when correctly seeded and protected from side-channel attacks such as a leaking of state, to be a cryptographically secure generator. This trait is provided as a tool to aid review of cryptographic code, but does not by itself guarantee suitability for cryptographic applications.
Implementors of TryCryptoRng
should only implement Default
if the
default()
instances are themselves secure generators: for example if the
implementing type is a stateless interface over a secure external generator
(like OsRng
) or if the default()
instance uses a strong, fresh seed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.