generateSignature method

Uint8List generateSignature(
  1. RSAPrivateKey privateKey,
  2. Uint8List message,
  3. HashAlgorithm digestAlgorithm
)

Generate a signature for the message

Implementation

Uint8List generateSignature(
  RSAPrivateKey privateKey,
  Uint8List message,
  HashAlgorithm digestAlgorithm,
) {
  // Get the hash for the message
  final digest = getDigest(digestAlgorithm);
  final hash = digest.process(message);

  return generateSignatureOfHash(privateKey, hash, digestAlgorithm);
}