code: @Override
      public String encode(final String data, final Optional<RegisteredService> service) {
          try {
              if (service.isPresent()) {
                  val registeredService = service.get();
                  val publicKey = createRegisteredServicePublicKey(registeredService);
                  val result = encodeInternal(data, publicKey, registeredService);
                  if (result != null) {
                      return EncodingUtils.encodeBase64(result);
                  }
              }
          } catch (final Exception e) {
              LOGGER.warn(e.getMessage(), e);
          }
          return null;
      }
docs: Encrypt using the given cipher associated with the service,
  and encode the data in base 64.
  
  @param data    the data
  @param service the registered service
  @return the encoded piece of data in base64