Function rustls_ffi::crypto_provider::rustls_crypto_provider_random

source ยท
#[no_mangle]
pub extern "C" fn rustls_crypto_provider_random(
    provider: *const rustls_crypto_provider,
    buff: *mut u8,
    len: size_t,
) -> rustls_result
Expand description

Write len bytes of cryptographically secure random data to buff using the crypto provider.

buff must point to a buffer of at least len bytes. The caller maintains ownership of the buffer.

Returns RUSTLS_RESULT_OK on success, or RUSTLS_RESULT_GET_RANDOM_FAILED on failure.