decrypt function
Decrypts a sealed message without verifying the signature.
This allows inspecting the signer before verification. Use signer to extract the signer's fingerprint, then verify or verifyDetached to verify.
msgToOpen: The serialized COSE_Encrypt0 structuremsgToAuth: The same additional authenticated data used during sealingrecipient: The xHPKE secret key to decrypt withdomain: Application domain for HPKE key derivation
Returns the decrypted COSE_Sign1 structure (not yet verified).
Implementation
Uint8List decrypt({
required Uint8List msgToOpen,
required Object? msgToAuth,
required xhpke.SecretKey recipient,
required Uint8List domain,
}) => ffi.coseDecrypt(
msgToOpen: msgToOpen,
msgToAuth: _encode(msgToAuth),
recipient: recipient.inner,
domain: domain,
);