pub unsafe extern "C-unwind" fn SecRandomCopyBytes(
rnd: SecRandomRef,
count: usize,
bytes: NonNull<c_void>,
) -> c_intAvailable on crate feature
SecRandom only.Expand description
Return count random bytes in *bytes, allocated by the caller. It is critical to check the return value for error.
Parameter rnd: Only
kSecRandomDefaultis supported.
Parameter count: The number of bytes to generate.
Parameter bytes: A buffer to fill with random output.
Returns: Return 0 on success, any other value on failure.
If
rndis unrecognized or unsupported,
kSecRandomDefaultis
used.
ยงSafety
rndmust be a valid pointer or null.bytesmust be a valid pointer.