validateKeyBits static method

Uint8List validateKeyBits(
  1. Uint8List bytes
)
override

Throws an error on invalid bytes and return the bytes itself anyway

Implementation

static Uint8List validateKeyBits(Uint8List bytes) {
  bytes = ExtendedSigningKey.validateKeyBits(bytes);

  if ((bytes[31] & 32) != 0) {
    throw InvalidSigningKeyError();
  }
  return bytes;
}