signDetachedAt function
Creates a COSE_Sign1 digital signature without an embedded payload, stamped with a timestamp from the caller.
Uses the same external_aad convention as signDetached.
msgToAuth: The message to sign (not embedded in COSE_Sign1)signer: The xDSA secret key to sign withdomain: Application domain for separating protocol purposestimestamp: Unix timestamp in seconds to embed in the protected header
Returns the serialized COSE_Sign1 structure. Throws if msgToAuth does not
encode into the supported CBOR subset.
Implementation
Uint8List signDetachedAt({
required Object? msgToAuth,
required xdsa.SecretKey signer,
required Uint8List domain,
required int timestamp,
}) => ffi.coseSignDetachedAt(
msgToAuth: _encode(msgToAuth),
signer: signer.inner,
domain: domain,
timestamp: timestamp,
);