Skip to content

Commit

Permalink
Convert hash to lowercase for checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
nahkd123 committed Apr 18, 2024
1 parent c1a6012 commit 410e265
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ private static byte[] hexToBytes(char[] chars) {
byte[] bs = new byte[chars.length / 2];

for (int i = 0; i < bs.length; i++) {
int msb = HEX.indexOf(chars[i * 2]);
int lsb = HEX.indexOf(chars[i * 2 + 1]);
int msb = HEX.indexOf(Character.toLowerCase(chars[i * 2]));
int lsb = HEX.indexOf(Character.toLowerCase(chars[i * 2 + 1]));
bs[i] = (byte) ((msb << 4) | lsb);
}

Expand Down

0 comments on commit 410e265

Please sign in to comment.