verifyPersonalMessage method

bool verifyPersonalMessage(
  1. List<int> messageDigest,
  2. String signature, {
  3. bool hashMessage = true,
  4. int? payloadLength,
  5. bool useEthereumPrefix = false,
})

Verifies the signature of a personal message using the public key.

Optionally, hashMessage can be set to false to skip hashing the message before verification. Optionally, payloadLength can be set to specify the payload length for the message.

Implementation

bool verifyPersonalMessage(List<int> messageDigest, String signature,
    {bool hashMessage = true,
    int? payloadLength,
    bool useEthereumPrefix = false}) {
  final verifier = TronVerifier.fromKeyBytes(toBytes());
  return verifier.verifyPersonalMessage(
      messageDigest, BytesUtils.fromHexString(signature),
      hashMessage: hashMessage,
      payloadLength: payloadLength,
      useEthPrefix: useEthereumPrefix);
}