UNPKG

@wildboar/pkcs

Version:
45 lines 1.98 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_Attributes = exports._decode_Attributes = void 0; const $ = require("asn1-ts/dist/node/functional"); const Attribute_ta_1 = require("@wildboar/x500/src/lib/modules/InformationFramework/Attribute.ta"); /* END_OF_SYMBOL_DEFINITION Attributes */ /* START_OF_SYMBOL_DEFINITION _cached_decoder_for_Attributes */ let _cached_decoder_for_Attributes = null; /* END_OF_SYMBOL_DEFINITION _cached_decoder_for_Attributes */ /* START_OF_SYMBOL_DEFINITION _decode_Attributes */ /** * @summary Decodes an ASN.1 element into a(n) Attributes * @function * @param {_Element} el The element being decoded. * @returns {Attributes} The decoded data structure. */ function _decode_Attributes(el) { if (!_cached_decoder_for_Attributes) { _cached_decoder_for_Attributes = $._decodeSetOf(() => Attribute_ta_1._decode_Attribute); } return _cached_decoder_for_Attributes(el); } exports._decode_Attributes = _decode_Attributes; /* END_OF_SYMBOL_DEFINITION _decode_Attributes */ /* START_OF_SYMBOL_DEFINITION _cached_encoder_for_Attributes */ let _cached_encoder_for_Attributes = null; /* END_OF_SYMBOL_DEFINITION _cached_encoder_for_Attributes */ /* START_OF_SYMBOL_DEFINITION _encode_Attributes */ /** * @summary Encodes a(n) Attributes 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 Attributes, encoded as an ASN.1 Element. */ function _encode_Attributes(value, elGetter) { if (!_cached_encoder_for_Attributes) { _cached_encoder_for_Attributes = $._encodeSetOf(() => Attribute_ta_1._encode_Attribute, $.BER); } return _cached_encoder_for_Attributes(value, elGetter); } exports._encode_Attributes = _encode_Attributes; /* END_OF_SYMBOL_DEFINITION _encode_Attributes */ /* eslint-enable */ //# sourceMappingURL=Attributes.ta.js.map