sign function

String sign(
  1. String message,
  2. ECPrivateKey key
)

Sign a message.

Implementation

String sign(String message, ECPrivateKey key) {
  // ignore: omit_local_variable_types
  ECDSASigner signer = _createSigner(key);
  ECSignature signature = signer.generateSignature(utf8.encode(message));

  return _encodeSignature(signature);
}