pqc_format_new

Function pqc_format_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pqc_format_new( algorithm_id: u16, iv: *const c_uchar, iv_len: usize, tag: *const c_uchar, tag_len: usize, data: *const c_uchar, data_len: usize, ) -> *mut PqcFormatHandle
Expand description

Create a new PQC Binary Format structure

§Parameters

  • algorithm_id: Algorithm identifier (see Algorithm enum)
  • iv: IV/nonce bytes
  • iv_len: Length of IV
  • tag: Authentication tag bytes
  • tag_len: Length of tag
  • data: Encrypted data bytes
  • data_len: Length of encrypted data

§Returns

Opaque handle to PqcBinaryFormat, or NULL on error

§Safety

All pointers must be valid. The returned handle must be freed with pqc_format_free.