signAt function
Creates a COSE_Sign1 digital signature with an embedded payload, stamped with a timestamp from the caller.
msgToEmbed: The message to sign (embedded in COSE_Sign1)msgToAuth: Additional authenticated data (not embedded, but signed)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 msgToEmbed or
msgToAuth does not encode into the supported CBOR subset.
Implementation
Uint8List signAt({
required Object? msgToEmbed,
required Object? msgToAuth,
required xdsa.SecretKey signer,
required Uint8List domain,
required int timestamp,
}) => ffi.coseSignAt(
msgToEmbed: _encode(msgToEmbed),
msgToAuth: _encode(msgToAuth),
signer: signer.inner,
domain: domain,
timestamp: timestamp,
);