@Override
    protected int engineGetKeySize(Key key) throws InvalidKeyException {
        if (!(key instanceof SecretKey)) {
            throw new InvalidKeyException("Only SecretKey is supported");
        }
        byte[] encodedKey = key.getEncoded();
        if (encodedKey == null) {
            throw new InvalidKeyException("key.getEncoded() == null");
        }
        checkSupportedKeySize(encodedKey.length);
        // The return value is in bits
        return encodedKey.length * 8;
    }
The size of output if {@code update()} is called with this
{@code inputLen}. If padding is enabled and the size of the input puts it
right at the block size, it will add another block for the padding.
common/src/main/java/org/conscrypt/OpenSSLCipher.java