JavaScript generic ASN.1 parser (mirror)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add new Base64 type parameter to pass down to Stream.

+5 -3
+5 -3
asn1.js
··· 561 561 toHexString(type = 'raw') { 562 562 return this.stream.hexDump(this.posStart(), this.posEnd(), type); 563 563 } 564 - /** Base64url dump of the node (according to RFC 4648 section 5). */ 565 - toB64String() { 566 - return this.stream.b64Dump(this.posStart(), this.posEnd()); 564 + /** Base64url dump of the node (according to RFC 4648 section 5). 565 + * @param {string} type 'url' (default, section 5 without padding) or 'std' (section 4 with padding) 566 + */ 567 + toB64String(type = 'url') { 568 + return this.stream.b64Dump(this.posStart(), this.posEnd(), type); 567 569 } 568 570 static decodeLength(stream) { 569 571 let buf = stream.get(),