Skip to content

Commit

Permalink
fix: crypto check
Browse files Browse the repository at this point in the history
  • Loading branch information
nanov committed Mar 30, 2021
1 parent 9ee2be9 commit 936e103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/crypto/Crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = class Crypto {
const mod = new BigNumber(key.n());
const buffer = modPow(base, power, mod).toBEBuffer();

if (buffer.byteLength !== 257 && buffer[0] === 0x00)
if (buffer.byteLength === 257 && buffer[0] === 0x00)
return buffer.slice(1).toString('base64');

return buffer.toString('base64');
Expand Down

0 comments on commit 936e103

Please sign in to comment.