asn1-ts
Version:
ASN.1 encoding and decoding, including BER, CER, and DER.
60 lines (59 loc) • 2.23 kB
text/typescript
import type ObjectIdentifier from "./types/ObjectIdentifier.mjs";
import type EmbeddedPDV from "./types/EmbeddedPDV.mjs";
import type External from "./types/External.mjs";
import type DURATION_EQUIVALENT from "./types/time/DURATION-EQUIVALENT.mjs";
export type COMPONENTS_OF<T> = T;
export type OPTIONAL<T> = T | undefined;
export type BOOLEAN = boolean;
export type INTEGER = number | bigint;
export type BIT_STRING = Uint8ClampedArray;
export type OCTET_STRING = Uint8Array;
export type NULL = null;
export type OBJECT_IDENTIFIER = ObjectIdentifier;
export type ObjectDescriptor = string;
export type EXTERNAL = External;
export type REAL = number;
export type INSTANCE_OF = External;
export type ENUMERATED = number;
export type EMBEDDED_PDV = EmbeddedPDV;
export type UTF8String = string;
export type RELATIVE_OID = number[];
export type SEQUENCE<T> = T[];
export type SEQUENCE_OF<T> = T[];
export type SET<T> = T[];
export type SET_OF<T> = T[];
export type GraphicString = string;
export type NumericString = string;
export type VisibleString = string;
export type PrintableString = string;
export type ISO646String = string;
export type TeletexString = Uint8Array;
export type GeneralString = string;
export type T61String = Uint8Array;
export type UniversalString = string;
export type VideotexString = Uint8Array;
export type BMPString = string;
export type IA5String = string;
export { default as CharacterString } from "./types/CharacterString.mjs";
export type UTCTime = Date;
export type GeneralizedTime = Date;
export type TIME = string;
export type DATE = Date;
export type TIME_OF_DAY = Date;
export type DATE_TIME = Date;
export type DURATION = DURATION_EQUIVALENT;
export type OID_IRI = string;
export type RELATIVE_OID_IRI = string;
export declare const TRUE = true;
export declare const FALSE = false;
export declare const TRUE_BIT = 1;
export declare const FALSE_BIT = 0;
export declare const PLUS_INFINITY: number;
export declare const MINUS_INFINITY: number;
export declare const NOT_A_NUMBER: number;
export declare const itu_t = 0;
export declare const ccitt = 0;
export declare const itu_r = 0;
export declare const iso = 1;
export declare const joint_iso_itu_t = 2;
export declare const joint_iso_ccitt = 2;