Skip to content

Instantly share code, notes, and snippets.

from hashlib import sha512
import base64
import hmac
def compute_signature(uri, params, token):
token = token.encode("utf-8")
s = uri
if len(params) > 0:
for k, v in sorted(params.items()):
import java.net.URL;
import java.net.HttpURLConnection;
import java.io.*;
import org.json.JSONObject;
import java.util.Base64;
import java.nio.charset.StandardCharsets;
class KarixMessageExample {
public static void main(String[] args) {
try {