class Validators {

  public static void validateAesKeySize(int sizeInBytes) throws InvalidAlgorithmParameterException {
    if (sizeInBytes != 16 && sizeInBytes != 32) {
      throw new InvalidAlgorithmParameterException(
          String.format(
              "invalid key size %d; only 128-bit and 256-bit AES keys are supported",
              sizeInBytes * 8));
    }
  }

  private  Validators();

}