UNPKG

@wildboar/pki-stub

Version:
49 lines 1.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_Name = exports._decode_Name = void 0; const $ = require("asn1-ts/dist/node/functional"); const RDNSequence_ta_1 = require("../PKI-Stub/RDNSequence.ta"); /* END_OF_SYMBOL_DEFINITION Name */ /* START_OF_SYMBOL_DEFINITION _cached_decoder_for_Name */ let _cached_decoder_for_Name = null; /* END_OF_SYMBOL_DEFINITION _cached_decoder_for_Name */ /* START_OF_SYMBOL_DEFINITION _decode_Name */ /** * @summary Decodes an ASN.1 element into a(n) Name * @function * @param {_Element} el The element being decoded. * @returns {Name} The decoded data structure. */ function _decode_Name(el) { if (!_cached_decoder_for_Name) { _cached_decoder_for_Name = $._decode_inextensible_choice({ "UNIVERSAL 16": ["rdnSequence", RDNSequence_ta_1._decode_RDNSequence], }); } return _cached_decoder_for_Name(el); } exports._decode_Name = _decode_Name; /* END_OF_SYMBOL_DEFINITION _decode_Name */ /* START_OF_SYMBOL_DEFINITION _cached_encoder_for_Name */ let _cached_encoder_for_Name = null; /* END_OF_SYMBOL_DEFINITION _cached_encoder_for_Name */ /* START_OF_SYMBOL_DEFINITION _encode_Name */ /** * @summary Encodes a(n) Name into an ASN.1 Element. * @function * @param {value} el The element being decoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The Name, encoded as an ASN.1 Element. */ function _encode_Name(value, elGetter) { if (!_cached_encoder_for_Name) { _cached_encoder_for_Name = $._encode_choice({ rdnSequence: RDNSequence_ta_1._encode_RDNSequence, }, $.BER); } return _cached_encoder_for_Name(value, elGetter); } exports._encode_Name = _encode_Name; /* END_OF_SYMBOL_DEFINITION _encode_Name */ /* eslint-enable */ //# sourceMappingURL=Name.ta.js.map