pub unsafe fn array_output_pull(
array_output: ArrayOutput,
buf: *mut u8,
buf_len: Size,
) -> Result<Size, CryptoErrno>Expand description
Copy the content of an array_output object into an application-allocated
buffer.
Multiple calls to that function can be made in order to consume the data in a streaming fashion, if necessary.
The function returns the number of bytes that were actually copied. 0
means that the end of the stream has been reached. The total size always
matches the output of array_output_len().
The handle is automatically closed after all the data has been consumed.
Example usage:
let len = array_output_len(output_handle)?;
let mut out = vec![0u8; len];
array_output_pull(output_handle, &mut out)?;