UNPKG

@wildboar/pki-stub

Version:
46 lines (45 loc) 1.16 kB
import { OBJECT_IDENTIFIER } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; /** * @summary EXTENSION * @description * * ### ASN.1 Definition: * * ```asn1 * EXTENSION ::= CLASS { * &id OBJECT IDENTIFIER UNIQUE, * &ExtnType } * WITH SYNTAX { * SYNTAX &ExtnType * IDENTIFIED BY &id } * ``` * * @interface */ export interface EXTENSION<ExtnType = any> { /** * @summary A fixed string that can be used for external programs to determine the object class of this object. */ readonly class: "EXTENSION"; /** * @summary A map of type fields to their corresponding decoders. */ readonly decoderFor: Partial<{ [_K in keyof EXTENSION<ExtnType>]: $.ASN1Decoder<EXTENSION<ExtnType>[_K]>; }>; /** * @summary A map of type fields to their corresponding encoders. */ readonly encoderFor: Partial<{ [_K in keyof EXTENSION<ExtnType>]: $.ASN1Encoder<EXTENSION<ExtnType>[_K]>; }>; /** * @summary &id */ readonly "&id"?: OBJECT_IDENTIFIER; /** * @summary &ExtnType */ readonly "&ExtnType": ExtnType; }