riot_sys

Function cose_sign_decode_header

Source
pub unsafe extern "C" fn cose_sign_decode_header(
    sign: *const cose_sign_dec_t,
    hdr: *mut cose_hdr_t,
    key: i32,
) -> c_int
Expand description

@brief Retrieve a header from a sign object by key lookup.

This function first attempts to retrieve the header from the protected bucket and then from the unprotected bucket.

@param sign The sign decode object to operate on @param hdr hdr struct to fill @param key The key to look up

@return COSE_OK if a header is found @return COSE_ERR_NOT_FOUND if no header with matching key is found