#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_envelope_verify(
bytes: *const u8,
len: usize,
public_key: *const u8,
out_manifest: *mut PamojaManifest,
) -> PamojaStatusExpand description
Verifies an envelope against a key and reads the manifest inside it.
§Arguments
bytes- the signed envelope.len- the length ofbytes.public_key- thePAMOJA_KEY_LEN-byte key expected to have signed it.out_manifest- receives the verified manifest.
§Returns
PamojaStatus::Ok if the signature is from that key, or
PamojaStatus::Auth if it is not.
§Safety
bytes must point to at least len readable bytes or be null when len is
0, public_key must point to at least PAMOJA_KEY_LEN readable bytes, and
out_manifest must be writable.