verifySignature method
Verifies the signature of a blob using the provided verifying key.
This method takes a blob and a signature as input and uses the verifying key to verify the signature of the blob. It then returns a boolean indicating whether the signature is valid.
blob
The data blob to be verified.
signature
The signature to be verified.
returns A boolean value indicating whether the signature is valid.
Implementation
bool verifySignature(String blob, String signature) {
final verifyingKey =
XrpVerifier.fromKeyBytes(toBytes(), algorithm.curveType);
return verifyingKey.verify(
BytesUtils.fromHexString(blob), BytesUtils.fromHexString(signature));
}