verify method
Whether signature is valid for payload.
Implementations comparing bytes directly should use ASTBinaryFormat.constantTimeEquals rather than a plain list comparison, which returns sooner for a nearly-correct guess and so leaks how much of the signature an attacker got right.
Implementation
@override
bool verify(Uint8List payload, Uint8List signature) =>
ASTBinaryFormat.constantTimeEquals(
_hmac.convert(payload).bytes,
signature,
);