ed448Sign function

Uint8List ed448Sign(
  1. Uint8List privateKey,
  2. Uint8List message
)

Implementation

Uint8List ed448Sign(Uint8List privateKey, Uint8List message) {
  if (privateKey.length != ed448.KEY_LENGTH) {
    throw FormatException('Bad private key length');
  }

  if ((privateKey[ed448.KEY_LENGTH - 1] & 0x80) == 0) {
    return _bytes(ed448.sign(privateKey, message));
  }

  final scalar = _secretScalarForHdPrivateKey(privateKey);
  return _bytes(ed448.signWithScalar(scalar, scalar, message));
}