mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2024-11-21 13:42:06 +00:00
fix: crypto check
This commit is contained in:
parent
9ee2be97c4
commit
936e103c3f
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user