sign method

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

Signs a message digest using the ECDSA algorithm on the secp256k1 curve.

Optionally, the message can be hashed before signing.

Parameters:

  • digest: The message digest to be signed.
  • hashMessage: Whether to hash the message before signing (default is true).

Returns:

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

Throws:

Implementation

List<int> sign(List<int> digest, {bool hashMessage = true}) {
  return _signEcdsa(digest, hashMessage: hashMessage);
}