Open jablko opened 5 years ago
const INTEGER = asn1.define('INTEGER', function() { this.int(); }); console.log(INTEGER.decode(INTEGER.encode(-1))); // Error: non-byte EncoderBuffer value at: (shallow)
console.log(INTEGER.decode(INTEGER.encode(-1))); // <BN: -1> console.log(INTEGER.decode(INTEGER.encode(-0x81))); // <BN: -81>
Before
After