verify method
Verifies the signature for the provided digest using the available key and hashing option.
digest The digest to be verified.
signature The signature to be verified.
hashMessage Whether to hash the message before verification, defaults to true.
Implementation
bool verify(
List<int> digest,
List<int> signature, {
bool hashMessage = true,
}) {
if (_edsaVerifyKey != null) {
final messagaeHash =
hashMessage ? QuickCrypto.sha512HashHalves(digest).$1 : digest;
return _verifyEcdsa(messagaeHash, signature);
}
return _verifyEddsa(digest, signature);
}