verify method

bool verify(
  1. String content,
  2. String signature
)

验签

Implementation

bool verify(String content, String signature) {
  List<int> bytes = utf8.encode(content);
  Uint8List uint8List = Uint8List.fromList(bytes);
  return RSASigner(RSASignDigest.SHA256, publicKey: k)
      .verify(uint8List, Encrypted.fromBase64(signature));
}