This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()): |