UNPKG

@wildboar/pki-stub

Version:
35 lines 1.24 kB
import { ASN1Element as _Element, NumericString, PrintableString } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; /** * @summary CountryName * @description * * ### ASN.1 Definition: * * ```asn1 * CountryName ::= [APPLICATION 1] CHOICE { * x121-dcc-code NumericString(SIZE (ub-country-name-numeric-length)), * iso-3166-alpha2-code PrintableString(SIZE (ub-country-name-alpha-length)) } * ``` */ export type CountryName = { x121_dcc_code: NumericString; } | { iso_3166_alpha2_code: PrintableString; }; /** * @summary Decodes an ASN.1 element into a(n) CountryName * @function * @param {_Element} el The element being decoded. * @returns {CountryName} The decoded data structure. */ export declare function _decode_CountryName(el: _Element): CountryName; /** * @summary Encodes a(n) CountryName 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 CountryName, encoded as an ASN.1 Element. */ export declare function _encode_CountryName(value: CountryName, elGetter: $.ASN1Encoder<CountryName>): _Element; //# sourceMappingURL=CountryName.ta.d.mts.map