public void setAlgorithm(final String alg) {
        if (StringUtils.isNotBlank(alg)) {
            LOGGER.debug("Configured Jasypt algorithm [{}]", alg);
            jasyptInstance.setAlgorithm(alg);
            val required = isVectorInitializationRequiredFor(alg);
            setIvGenerator(required ? new RandomIvGenerator() : new NoIvGenerator());
        }
    }
Sets algorithm.

@param alg the alg
core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/support/CasConfigurationJasyptCipherExecutor.java