public static String encryptValueAsJwtRsaOeap256Aes256Sha512(final Key key, final Serializable value) {
        return JsonWebTokenEncryptor.builder()
            .key(key)
            .algorithm(KeyManagementAlgorithmIdentifiers.RSA_OAEP_256)
            .encryptionMethod(EncryptionJwtCryptoProperties.DEFAULT_CONTENT_ENCRYPTION_ALGORITHM)
            .build()
            .encrypt(value);
    }
Encrypt value as jwt rsa oeap 256 aes 256 sha 512 string.

@param key   the key
@param value the value
@return the string
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/EncodingUtils.java