Skip to content

Commit

Permalink
Export decode functions.
Browse files Browse the repository at this point in the history
(needed by VSCode extension)
  • Loading branch information
lapo-luchini committed Apr 21, 2024
1 parent 826f20c commit f2f3e2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function show(asn1) {
tree.appendChild(asn1.toDOM());
if (wantHex.checked) dump.appendChild(asn1.toHexDOM(undefined, trimHex.checked));
}
function decode(der, offset) {
export function decode(der, offset) {
offset = offset || 0;
try {
const asn1 = ASN1DOM.decode(der, offset);
Expand Down Expand Up @@ -103,7 +103,7 @@ function decode(der, offset) {
text(tree, e);
}
}
function decodeText(val) {
export function decodeText(val) {
try {
let der = reHex.test(val) ? Hex.decode(val) : Base64.unarmor(val);
decode(der);
Expand All @@ -112,7 +112,7 @@ function decodeText(val) {
dump.innerHTML = '';
}
}
function decodeBinaryString(str) {
export function decodeBinaryString(str) {
let der;
try {
if (reHex.test(str)) der = Hex.decode(str);
Expand Down

0 comments on commit f2f3e2a

Please sign in to comment.