sign method

List<int> sign(
  1. List<int> data, {
  2. String? algorithm,
})

Compute digital signature or MAC

Implementation

List<int> sign(List<int> data, {String? algorithm}) {
  _assertCanDo('sign');
  var signer = _keyPair.privateKey!.createSigner(_getAlgorithm(algorithm));
  var signature = signer.sign(data);
  return signature.data;
}