public static <T extends BaseStringCipherExecutor> T newStringCipherExecutor(
        final EncryptionJwtSigningJwtCryptographyProperties crypto,
        final Class<T> cipherClass) {
        return supplier(() -> {
            val ctor = cipherClass.getDeclaredConstructor(String.class, String.class,
                String.class, int.class, int.class);
            val cipher = ctor.newInstance(crypto.getEncryption().getKey(),
                crypto.getSigning().getKey(),
                crypto.getAlg(),
                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