Open ayZagen opened 4 months ago
I am trying to update a value from the decoded ber element. Here is quick snippet (npm RunKit):
const ber = new asn.BERElement(); ber.fromBytes( new Uint8Array( [ 48,12,2,1,1,96,7,2,1,3,4,0,128,0 ] ) ); ber.components[0].integer = ber.sequence[0].integer = 5; const newBytes = ber.toBytes(); console.assert( ber.components[0].integer === 5 ); console.assert( ber.sequence[0].integer === 5 ); console.assert( newBytes[4] === 5 );
All assertions fail.
How can I update a value and get the final updated structure?
I am trying to update a value from the decoded ber element. Here is quick snippet (npm RunKit):
All assertions fail.
How can I update a value and get the final updated structure?