UNPKG

@wildboar/rose

Version:
35 lines 1.01 kB
import { INTEGER, OBJECT_IDENTIFIER, ASN1Element as _Element } from '@wildboar/asn1'; import * as $ from '@wildboar/asn1/functional'; /** * @summary Code * @description * * ### ASN.1 Definition: * * ```asn1 * Code ::= CHOICE {local INTEGER, * global OBJECT IDENTIFIER * } * ``` */ export type Code = { local: INTEGER; } | { global: OBJECT_IDENTIFIER; }; /** * @summary Decodes an ASN.1 element into a(n) Code * @function * @param {_Element} el The element being decoded. * @returns {Code} The decoded data structure. */ export declare function _decode_Code(el: _Element): Code; /** * @summary Encodes a(n) Code into an ASN.1 Element. * @function * @param value The element being encoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The Code, encoded as an ASN.1 Element. */ export declare function _encode_Code(value: Code, elGetter: $.ASN1Encoder<Code>): _Element; //# sourceMappingURL=Code.ta.d.mts.map