Skip to main content

pamoja_manifest_decode

Function pamoja_manifest_decode 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_manifest_decode( bytes: *const u8, len: usize, out_manifest: *mut PamojaManifest, ) -> PamojaStatus
Expand description

Reads a manifest body back from its bytes.

This reads what a manifest claims; it proves nothing about who wrote it. Use pamoja_envelope_verify to read one whose signature has been checked.

§Arguments

  • bytes - the encoded manifest body.
  • len - the length of bytes.
  • out_manifest - receives the decoded manifest.

§Returns

PamojaStatus::Ok on success.

§Safety

bytes must point to at least len readable bytes, or be null when len is 0, and out_manifest must be writable.