signMessage method

Uint8List signMessage(
  1. int keyType,
  2. Uint8List m, [
  3. SecureRandom secureRandom
])

Implementation

Uint8List signMessage(int keyType, Uint8List m, [SecureRandom secureRandom]) {
  if (Key.ellipticCurveDSA(keyType)) {
    return signWithECDSAKey(m, secureRandom).toRaw();
  }
  switch (keyType) {
    case Key.ED25519:
      return signWithEd25519Key(m).toRaw();
    case Key.RSA:
      return signWithRSAKey(m).toRaw();
    default:
      throw FormatException('key type $keyType');
  }
}