#![allow(missing_docs)]
use wolfcose::{encrypt_to_vec, CoseKey, Recipient};
fn main() -> wolfcose::Result<()> {
let key = CoseKey::symmetric([0x44u8; 16])?;
let recipients = [
Recipient::new(wolfcose::Algorithm::DIRECT, &key).with_kid(b"device-a"),
Recipient::new(wolfcose::Algorithm::DIRECT, &key).with_kid(b"device-b"),
];
let mut scratch = [0u8; 512];
let iv = [0x55u8; 12];
let msg = encrypt_to_vec(
&recipients,
wolfcose::Algorithm::A128GCM,
&iv,
b"fleet config",
&[],
&mut scratch,
None,
)?;
println!("COSE_Encrypt bytes={}", msg.len());
Ok(())
}