[][src]Function devolutions_crypto::ffi::GenerateKey

#[no_mangle]
pub unsafe extern "C" fn GenerateKey(key: *mut u8, key_length: usize) -> i64

Generate a key using a CSPRNG.

Arguments

  • key - Pointer to the buffer to fill with random values.
  • key_length - Length of the buffer to fill.

Returns

Returns 0 if the operation is successful. If there is an error, it will return the appropriate error code defined in DevoCryptoError.