Skip to main content

pamoja_public_identity_verify

Function pamoja_public_identity_verify 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_public_identity_verify( public_key: *const u8, payload: *const u8, payload_len: usize, signature: *const u8, ) -> PamojaStatus
Expand description

Verifies that a signature covers a payload and was made by a public key.

§Returns

PamojaStatus::Ok if the signature is authentic, or PamojaStatus::Auth if it is not, which means the payload was altered or was signed by a different device.

§Safety

public_key must point to at least PAMOJA_KEY_LEN readable bytes; payload must point to at least payload_len readable bytes, or be null when payload_len is 0; and signature must point to at least PAMOJA_SIGNATURE_LEN readable bytes.