signDigest method

ECDSASignature signDigest({
  1. required List<int> digest,
  2. List<int>? entropy,
  3. required BigInt k,
  4. bool truncate = false,
})

Signs a given digest using the private key and a specified value of 'k'.

Implementation

ECDSASignature signDigest(
    {required List<int> digest,
    List<int>? entropy,
    required BigInt k,
    bool truncate = false}) {
  final digestInt =
      _truncateAndConvertDigest(digest, generator, truncate: truncate);
  final sign = privateKey.sign(digestInt, k);
  return sign;
}