UNPKG

@wildboar/pkcs

Version:
45 lines 2.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_ExtendedCertificate = exports._decode_ExtendedCertificate = void 0; const SIGNED_ta_1 = require("@wildboar/x500/src/lib/modules/AuthenticationFramework/SIGNED.ta"); const ExtendedCertificateInfo_ta_1 = require("../PKCS7/ExtendedCertificateInfo.ta"); /* END_OF_SYMBOL_DEFINITION ExtendedCertificate */ /* START_OF_SYMBOL_DEFINITION _cached_decoder_for_ExtendedCertificate */ let _cached_decoder_for_ExtendedCertificate = null; /* END_OF_SYMBOL_DEFINITION _cached_decoder_for_ExtendedCertificate */ /* START_OF_SYMBOL_DEFINITION _decode_ExtendedCertificate */ /** * @summary Decodes an ASN.1 element into a(n) ExtendedCertificate * @function * @param {_Element} el The element being decoded. * @returns {ExtendedCertificate} The decoded data structure. */ function _decode_ExtendedCertificate(el) { if (!_cached_decoder_for_ExtendedCertificate) { _cached_decoder_for_ExtendedCertificate = SIGNED_ta_1._get_decoder_for_SIGNED(ExtendedCertificateInfo_ta_1._decode_ExtendedCertificateInfo); } return _cached_decoder_for_ExtendedCertificate(el); } exports._decode_ExtendedCertificate = _decode_ExtendedCertificate; /* END_OF_SYMBOL_DEFINITION _decode_ExtendedCertificate */ /* START_OF_SYMBOL_DEFINITION _cached_encoder_for_ExtendedCertificate */ let _cached_encoder_for_ExtendedCertificate = null; /* END_OF_SYMBOL_DEFINITION _cached_encoder_for_ExtendedCertificate */ /* START_OF_SYMBOL_DEFINITION _encode_ExtendedCertificate */ /** * @summary Encodes a(n) ExtendedCertificate 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 ExtendedCertificate, encoded as an ASN.1 Element. */ function _encode_ExtendedCertificate(value, elGetter) { if (!_cached_encoder_for_ExtendedCertificate) { _cached_encoder_for_ExtendedCertificate = SIGNED_ta_1._get_encoder_for_SIGNED(ExtendedCertificateInfo_ta_1._encode_ExtendedCertificateInfo); } return _cached_encoder_for_ExtendedCertificate(value, elGetter); } exports._encode_ExtendedCertificate = _encode_ExtendedCertificate; /* END_OF_SYMBOL_DEFINITION _encode_ExtendedCertificate */ /* eslint-enable */ //# sourceMappingURL=ExtendedCertificate.ta.js.map