Skip to content

Commit

Permalink
Adjust hexToNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Nov 23, 2024
1 parent 672ac00 commit ba9ddf4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/slh-dsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ export type GetContext = (

function hexToNumber(hex: string): bigint {
if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);
// Big Endian
return BigInt(hex === '' ? '0' : `0x${hex}`);
return BigInt(hex === '' ? '0' : '0x' + hex); // Big Endian
}

// BE: Big Endian, LE: Little Endian
Expand Down

0 comments on commit ba9ddf4

Please sign in to comment.