public static <T extends BaseStringCipherExecutor> T newStringCipherExecutor(
        final EncryptionOptionalSigningOptionalJwtCryptographyProperties crypto,
        final Class<T> cipherClass) {
        return supplier(() -> {
            val ctor = cipherClass.getDeclaredConstructor(String.class, String.class,
                String.class, boolean.class, boolean.class, int.class, int.class);
            val resolver = SpringExpressionLanguageValueResolver.getInstance();
            val cipher = ctor.newInstance(
                resolver.resolve(crypto.getEncryption().getKey()),
                resolver.resolve(crypto.getSigning().getKey()),
                resolver.resolve(crypto.getAlg()),
                crypto.isEncryptionEnabled(),
                crypto.isSigningEnabled(),
                crypto.getSigning().getKeySize(),
                crypto.getEncryption().getKeySize());
            cipher.setStrategyType(BaseStringCipherExecutor.CipherOperationsStrategyType.valueOf(crypto.getStrategyType()));
            return cipher;
        }).get();
    }
New string cipher executor.

@param <T>         the type parameter
@param crypto      the crypto
@param cipherClass the cipher class
@return the t
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/cipher/CipherExecutorUtils.java