verify method
Verify the signature
of body
with key
return true
if the signature is correct false
otherwise
Implementation
@override
bool verify(JWTKey key, Uint8List body, Uint8List signature) {
assert(key is SecretKey, 'key must be a SecretKey');
final actual = sign(key, body);
if (actual.length != signature.length) return false;
for (var i = 0; i < actual.length; i++) {
if (actual[i] != signature[i]) return false;
}
return true;
}