var asn = require('asn1.js');
var Human = asn.define('Human', function() {
this.seq().obj(
this.key('firstName').int(),
);
});
var output = Human.encode({
firstName: 2500000000,
}, 'der');
var human = Human.decode(output, 'der');
console.log(human.firstName.toNumber());
It seems like an integer overflow. Shouldn't it allow more than 32 bits?
The following snippet yields
63744
:It seems like an integer overflow. Shouldn't it allow more than 32 bits?