@Override
    protected SecretKey engineGenerateKey() {
        if (secureRandom == null) {
            secureRandom = new SecureRandom();
        }

        return new SecretKeySpec(doKeyGeneration((keySizeBits + 7) / 8), algorithm);
    }
An implementation of {@link javax.crypto.KeyGenerator} suitable for use with other Conscrypt
algorithms.
common/src/main/java/org/conscrypt/KeyGeneratorImpl.java