verify method

bool verify(
  1. ECDSASignature signature,
  2. List<int> digest
)

Verifies a given ECDSA signature against a digest using the associated public key.

It internally converts the digest into a BigInt using the truncate-and-convert method, and then calls the 'verifies' method of the associated public key.

Returns true if the signature is valid for the provided digest, false otherwise.

Implementation

bool verify(ECDSASignature signature, List<int> digest) {
  final digestNumber =
      EcdsaSigningKey._truncateAndConvertDigest(digest, publicKey.generator);
  return publicKey.verifies(digestNumber, signature);
}