class Validators {

  public static void validateRsaPublicExponent(
      BigInteger publicExponent) throws GeneralSecurityException {
    if (!publicExponent.testBit(0)) {
      throw new GeneralSecurityException("Public exponent must be odd.");
    }

    if (publicExponent.compareTo(BigInteger.valueOf(65536)) <= 0) {
      throw new GeneralSecurityException("Public exponent must be greater than 65536.");
    }
  }

  private  Validators();

}