signDetached function
Creates a COSE_Sign1 digital signature without an embedded payload (the envelope payload is null).
The caller's message is included in external_aad, and the payload in the
signature input is empty. See the library's wire profile for
interoperability.
Uses the current system time as the signature timestamp, and signDetachedAt takes it from the caller instead.
msgToAuth: The message to sign (not embedded in COSE_Sign1)signer: The xDSA secret key to sign withdomain: Application domain for separating protocol purposes
Returns the serialized COSE_Sign1 structure. Throws if msgToAuth does not
encode into the supported CBOR subset.
Implementation
Uint8List signDetached({
required Object? msgToAuth,
required xdsa.SecretKey signer,
required Uint8List domain,
}) => ffi.coseSignDetached(
msgToAuth: _encode(msgToAuth),
signer: signer.inner,
domain: domain,
);