Skip to main content

hide_decrypt

Function hide_decrypt 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hide_decrypt( container: *const u8, container_len: usize, secret: *const HideSecretKey, out: *mut HideBuffer, out_filename: *mut HideBuffer, out_media_type: *mut HideBuffer, ) -> i32
Expand description

Decrypts a container. Nothing is written to out unless the whole payload authenticates, so a caller cannot act on unverified plaintext.

Metadata is returned as length-prefixed buffers rather than C strings: the values are attacker-controlled, and a length is not something a caller can get wrong by scanning for a terminator. Free them like any buffer.

ยงSafety

All pointers must be valid for the stated lengths.