Name Description Size
cose.rs This crate implements [COSE](https://tools.ietf.org/html/rfc8152) signature parsing. Verification has to be performed by the caller. Example usage: Let `payload` and `cose_signature` be variables holding the signed payload and the COSE signature bytes respectively. Let further `verify_callback` be a function callback that implements signature verification. ```rust,ignore use cose::decoder::decode_signature; // Parse the incoming signature. let cose_signatures = decode_signature(cose_signature, &payload); let cose_signatures = match cose_signatures { Ok(signature) => signature, Err(_) => Vec::new(), }; if cose_signatures.len() < 1 { return false; } let mut result = true; for cose_signature in cose_signatures { // Call callback to verify the parsed signatures. result &= verify_callback(cose_signature); // We can stop early. The cose_signature is not valid. if !result { return result; } } ``` 1971
decoder.rs Parse and decode COSE signatures. 7736
test_cose.rs 22664
test_setup.rs 11675
util.rs 1060