export declare const VERSION: string; import { ASN1Object } from "typepki-asn1parse"; /** * generate ASN.1 DER/BER encoded hexadecimal string from JSON data * @param p - JSON object representing ASN.1 structure * @return hexadecimal string of ASN.1 DER/BER encoded hexadecimal string * @example * getASN1({ t: "int", v: "12ab" }) -> "020212ab" * getASN1({ t: "seq", v: [ * { t: "int", v: "01" }, * { t: "int", v: "02" } * ]}) -> "3006020101020102" */ export declare function getASN1(p: ASN1Object): string; /** * get a hexadecimal string of ASN.1 tag by a tag name * @param tagName - name of ASN.1 tag * @return hexadecimal string of ASN.1 tag * @example * tagtohex("bool") -> "01" * tagtohex("utf8str") -> "0c" * tagtohex("a4") -> context specific constructed tag 4 * tagtohex("80") -> context specific tag 0 */ export declare function tagtohex(tagName: string): string; /** * convert hexadecimal positive integer to ASN.1 integer value * @param h - hexadecimal string of positive integer * @return ASN.1 Integer DER encoded hexadecimal string * @example * pospad("01") -> "01" * pospad("ab") -> "00ab" * pospad("00000012") -> "12" * pospad("000000ab") -> "00ab" */ export declare function pospad(h: string): string; /** * get ASN.1 TLV length octet(s) by TLV value octet length * @param n - TLV value octet length * @return hexadecimal string of TLV length octets * @example * getLength(3) -> "03" * getLength(128) -> "8180" */ export declare function getLength(n: number): string; /** * zero padding for hexadecimal string * @param s - odd or even length hexadecimal string * @return even length zero padded hexadecimal string * @deprecated use hexpad in typepki-strconv * @example * hexpad("1") -> "01" * hexpad("ab3c") -> "ab3c" */ export declare function hexpad(s: string): string; //# sourceMappingURL=index.d.mts.map