sign method

  1. @override
List<int> sign(
  1. List<int> digest, {
  2. bool hashMessage = true,
})
override

Signs a personal message digest with an optional payload length.

The Ethereum personal sign prefix is applied to the message, and the resulting signature is returned as a byte list. Optionally, a payload length can be provided.

Parameters:

  • digest: The personal message digest to be signed.
  • payloadLength: An optional payload length to include in the message prefix.

Returns:

  • A byte list representing the signature of the personal message.

Implementation

@override
List<int> sign(List<int> digest, {bool hashMessage = true}) {
  return _signEcdsa(digest, hashMessage: hashMessage).toBytes(false);
}