Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static String sign(String message, String secret) {
Mac sha256_HMAC = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKeySpec = new SecretKeySpec(secret.getBytes(), "HmacSHA256");
sha256_HMAC.init(secretKeySpec);
return Hex.encodeHexString(sha256_HMAC.doFinal(message.getBytes()));
return new String(Hex.encodeHex(sha256_HMAC.doFinal(message.getBytes())));
} catch (Exception e) {
throw new RuntimeException("Unable to sign message.", e);
}
Expand Down