public String encrypt(String strToEncrypt) throws TikaConfigException {
            try {
                Cipher cipher = Cipher.getInstance(CIPHER_TYPE);
                cipher.init(Cipher.ENCRYPT_MODE, secretKey);
                return Base64.getEncoder().encodeToString(
                        cipher.doFinal(strToEncrypt.getBytes(StandardCharsets.UTF_8)));
            } catch (NoSuchAlgorithmException | InvalidKeyException |
                    NoSuchPaddingException | BadPaddingException | IllegalBlockSizeException e) {
                throw new TikaConfigException("bad encryption info", e);
            }
        }
only basic and ntlm are supported

@param authScheme
tika-pipes/tika-httpclient-commons/src/main/java/org/apache/tika/client/HttpClientFactory.java