#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_session_hmac_sha256(
key: *const u8,
key_len: usize,
message: *const u8,
message_len: usize,
out_digest: *mut u8,
) -> PamojaStatusExpand description
Computes a keyed hash over a message.
This is the primitive a host uses to authenticate a pairing exchange or a single command, where a whole session would be more than the job needs.
§Arguments
key- the secret key.key_len- the length ofkey.message- the message to authenticate.message_len- the length ofmessage.out_digest- receivesPAMOJA_SESSION_KEY_LENbytes.
§Returns
PamojaStatus::Ok on success.
§Safety
key and message must point to at least their stated lengths of readable
bytes, or be null when those lengths are 0, and out_digest must point to at
least PAMOJA_SESSION_KEY_LEN writable bytes.