rb_random_bytes

Function rb_random_bytes 

Source
pub unsafe extern "C" fn rb_random_bytes(
    rnd: VALUE,
    n: c_long,
) -> VALUE
Expand description

Generates a String of random bytes.

@param[in,out] rnd An instance of ::rb_cRandom. @param[in] n Requested number of bytes. @return An instance of ::rb_cString, of binary, of n bytes length, whose contents are random bits.

@internal

§@shyouhei doesn’t know if this is an Easter egg or an official feature, but this function can take a wider range of objects, such as Socket::Ifaddr. The arguments are just silently ignored and the default RNG is used instead, if they are non-RNG.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3