Function sign_detached
pub fn sign_detached<S>(
signing_key: &S,
payload: &[u8],
external_aad: &[u8],
) -> Result<Vec<u8>, Error>where
S: CoseSigner,Expand description
Sign payload (detached) with signing_key, producing CBOR-encoded
COSE_Sign1 bytes.
The protected header contains the algorithm + kid. external_aad
is folded into the Sig_structure per RFC 9052 §4.4 but is not
transmitted in the COSE object — receivers must reconstruct it.