code: public Optional<String> getEncryptionKey(final RegisteredService registeredService) {
          val property = getEncryptionKeyRegisteredServiceProperty();
          if (property.isAssignedTo(registeredService)) {
              val key = property.getPropertyValue(registeredService).getValue();
              return Optional.of(key);
          }
          return Optional.empty();
      }
docs: Gets encryption key.
  
  @param registeredService the registered service
  @return the encryption key