Skip to main content

pamoja_mavlink_signer_new

Function pamoja_mavlink_signer_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_mavlink_signer_new( key: *const u8, link_id: u8, timestamp: u64, out_signer: *mut *mut PamojaMavlinkSigner, ) -> PamojaStatus
Expand description

Creates a signer.

§Arguments

  • key - the shared signing key, PAMOJA_MAVLINK_KEY_LEN bytes.
  • link_id - which link this sender signs on, so two links from one system do not look like replays of each other.
  • timestamp - the timestamp to start from, usually from pamoja_mavlink_timestamp_from_unix_micros.
  • out_signer - set to the signer handle on success, and to null otherwise.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument if either pointer is null.

§Safety

key must point to PAMOJA_MAVLINK_KEY_LEN readable bytes and out_signer must point at writable storage for one pointer.