public Optional<String> getEncryptionKey(final RegisteredService registeredService) {
        val property = getEncryptionKeyRegisteredServiceProperty();
        if (property.isAssignedTo(registeredService)) {
            val key = property.getPropertyValue(registeredService).value();
            return Optional.of(key);
        }
        return Optional.empty();
    }
Gets encryption key.

@param registeredService the registered service
@return the encryption key
support/cas-server-support-token-core-api/src/main/java/org/apereo/cas/token/cipher/RegisteredServiceJwtTicketCipherExecutor.java