verifyAt<T> function
T
verifyAt<T>({})
Validates a COSE_Sign1 digital signature against a time from the caller and returns the embedded payload.
msgToCheck: The serialized COSE_Sign1 structuremsgToAuth: The same additional authenticated data used during signingverifier: The xDSA public key to verify againstdomain: Application domain for separating protocol purposesmaxDriftSecs: Maximum allowed timestamp difference in seconds, past or future. A value of n accepts differences up to and including n;nullskips the check.now: Unix timestamp in seconds to measure the drift against
Returns the embedded payload decoded by the cbor package, cast to T.
Throws as verify does, with the drift measured against now.
Implementation
T verifyAt<T>({
required Uint8List msgToCheck,
required Object? msgToAuth,
required xdsa.PublicKey verifier,
required Uint8List domain,
int? maxDriftSecs,
required int now,
}) =>
_decode(
ffi.coseVerifyAt(
msgToCheck: msgToCheck,
msgToAuth: _encode(msgToAuth),
verifier: verifier.inner,
domain: domain,
maxDriftSecs: _drift(maxDriftSecs),
now: now,
),
)
as T;