protected void checkKeySize(int keySize) {
        if (keySize <= 0) {
            throw new InvalidParameterException("Key size must be positive");
        }
    }
An implementation of {@link javax.crypto.KeyGenerator} suitable for use with other Conscrypt
algorithms.
common/src/main/java/org/conscrypt/KeyGeneratorImpl.java