pub unsafe extern "C" fn aws_sha256_compute(
allocator: *mut aws_allocator,
input: *const aws_byte_cursor,
output: *mut aws_byte_buf,
truncate_to: usize
) -> c_int
Expand description
Computes the sha256 hash over input and writes the digest output to ‘output’. Use this if you don’t need to stream the data you’re hashing and you can load the entire input to hash into memory. If you specify truncate_to to something other than 0, the output will be truncated to that number of bytes. For example, if you want a SHA256 digest as the first 16 bytes, set truncate_to to 16. If you want the full digest size, just set this to 0.