Skip to main content

pamoja_lorawan_wrap_mc_key

Function pamoja_lorawan_wrap_mc_key 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lorawan_wrap_mc_key( mc_ke_key: *const u8, mc_key: *const u8, out_wrapped: *mut u8, ) -> PamojaStatus
Expand description

Wraps a group key for a device, which is what a server does before sending it.

§Arguments

  • mc_ke_key - the device’s sixteen-byte key encryption key.
  • mc_key - the sixteen-byte group key.
  • out_wrapped - receives the sixteen bytes a setup command carries.

§Returns

PamojaStatus::Ok on success.

§Errors

Returns PamojaStatus::InvalidArgument for a null pointer.

§Safety

Every pointer must be valid for sixteen bytes.