Function av_random_bytes

pub unsafe extern "C" fn av_random_bytes(
    buf: *mut u8,
    len: usize,
) -> i32
Expand description

Generate cryptographically secure random data, i.e. suitable for use as encryption keys and similar.

@param buf buffer into which the random data will be written @param len size of buf in bytes

@retval 0 success, len bytes of random data was written into buf @retval “a negative AVERROR code” random data could not be generated