sign method

Uint8List sign (
  1. Uint8List data
)

Sign the provided data with the keypair's private key data.

Implementation

Uint8List sign(Uint8List data) {
  if (_mPrivateKey == null) {
    throw new Exception(
        "KeyPair does not contain secret key. Use KeyPair.fromSecretSeed method to create a new KeyPair with a secret key.");
  }
  ed25519.Signature sgr = ed25519.Signature(null, _mPrivateKey);
  return sgr.detached(data);
}