A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/rustls/latest/rustls/crypto/trait.SecureRandom.html below:

SecureRandom in rustls::crypto - Rust

pub trait SecureRandom:
    Send
    + Sync
    + Debug {
    // Required method
    fn fill(&self, buf: &mut [u8]) -> Result<(), GetRandomFailed>;

    // Provided method
    fn fips(&self) -> bool { ... }
}
Expand description

A source of cryptographically secure randomness.

Source

Fill the given buffer with random bytes.

The bytes must be sourced from a cryptographically secure random number generator seeded with good quality, secret entropy.

This is used for all randomness required by rustls, but not necessarily randomness required by the underlying cryptography library. For example: SupportedKxGroup::start() requires random material to generate an ephemeral key exchange key, but this is not included in the interface with rustls: it is assumed that the cryptography library provides for this itself.

Source

Return true if this is backed by a FIPS-approved implementation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4