protected String encryptValueAsJwt(final Key encryptionKey, final Serializable value) {
        val headers = new LinkedHashMap<>(getCommonHeaders());
        headers.putAll(getEncryptionOpHeaders());
        return JsonWebTokenEncryptor.builder()
            .key(encryptionKey)
            .algorithm(encryptionAlgorithm)
            .encryptionMethod(contentEncryptionAlgorithmIdentifier)
            .headers(headers)
            .build()
            .encrypt(value);
    }
The {@link BaseStringCipherExecutor} is the default
implementation of {@link CipherExecutor}. It provides
a facade API to encrypt, sign, and verify values.

@author Misagh Moayyed
@since 4.1
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/cipher/BaseStringCipherExecutor.java