It looks like you're new here. If you want to get involved, click one of these buttons!
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;
}