code: private String getSignature(String sharedSecret, Map<String, String> params) {
          StringBuffer buffer = new StringBuffer();
          buffer.append(sharedSecret);
          for (Map.Entry<String, String> entry : params.entrySet()) {
              buffer.append(entry.getKey());
              buffer.append(entry.getValue());
          }
  
          try {
              MessageDigest md = MessageDigest.getInstance("MD5");
              return ByteUtilities.toHexString(md.digest(buffer.toString().getBytes("UTF-8")));
          } catch (NoSuchAlgorithmException e) {
              throw new RuntimeException(e);
          } catch (UnsupportedEncodingException u) {
              throw new RuntimeException(u);
          }
      }
docs: Get a signature for a list of parameters using the given shared secret.
  
  @param sharedSecret
  The shared secret
  @param params
  The parameters
  @return The signature String