sign method
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:
- ArgumentException if the digest length is invalid.
Implementation
List<int> sign(List<int> digest, {bool hashMessage = true}) {
return _signEcdsa(digest, hashMessage: hashMessage);
}