signDetached function
Creates a COSE_Sign1 digital signature without an embedded payload (i.e. payload is empty).
Uses the current system time as the signature timestamp.
msgToAuth: The message to sign (not embedded in COSE_Sign1)signer: The xDSA secret key to sign withdomain: Application domain for replay protection
Returns the serialized COSE_Sign1 structure.
Implementation
Uint8List signDetached({
required Object? msgToAuth,
required xdsa.SecretKey signer,
required Uint8List domain,
}) => ffi.coseSignDetached(
msgToAuth: _encode(msgToAuth),
signer: signer.inner,
domain: domain,
);