Skip to main content

pamoja_delegation_open

Function pamoja_delegation_open 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_delegation_open( bytes: *const u8, len: usize, anchor_public_key: *const u8, out_delegation: *mut PamojaDelegation, ) -> PamojaStatus
Expand description

Opens a signed delegation against the anchor that should have signed it.

§Arguments

  • bytes - the signed delegation envelope.
  • len - the length of bytes.
  • anchor_public_key - the PAMOJA_KEY_LEN-byte anchor key.
  • out_delegation - receives the verified delegation.

§Returns

PamojaStatus::Ok if the delegation is from the anchor, or PamojaStatus::Auth if it is not.

§Safety

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