Invalid checksum

RH1558
{"status": "error", "message": "Invalid checksum", "error_type": "TokenException"}

following is my java code for generate SHA-256 hash


String checkSum = getCheckSum(apikey+requestToken+apisec);

private String getCheckSum(String data)
{
String checkSum = null;
System.out.println("SHA TEXT "+data);
try
{
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(data.getBytes(StandardCharsets.UTF_8));
checkSum = String.valueOf(hash);
checkSum = DatatypeConverter.printHexBinary(hash); // make it printable
}
catch (NoSuchAlgorithmException e)
{
e.printStackTrace();
}
return checkSum;
}


also verify on xorbin.com/tools/sha256-hash-calculator same as my code genrate
  • Kailash
    That's strange. Can you PM me an api_key + request_token + secret combination along with the checksum you're generating?
  • RH1558
    issue is solve, checkSum = DatatypeConverter.printHexBinary(hash); is not required. thanks for reply
This discussion has been closed.