@wildboar/pki-stub
Version:
X.510 PKI-Stub ASN.1 data structures in TypeScript
47 lines • 2.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_Certificate = exports._decode_Certificate = void 0;
const SIGNED_ta_1 = require("../PKI-Stub/SIGNED.ta");
const TBSCertificate_ta_1 = require("../PKI-Stub/TBSCertificate.ta");
/* END_OF_SYMBOL_DEFINITION Certificate */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_Certificate */
let _cached_decoder_for_Certificate = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_Certificate */
/* START_OF_SYMBOL_DEFINITION _decode_Certificate */
/**
* @summary Decodes an ASN.1 element into a(n) Certificate
* @function
* @param {_Element} el The element being decoded.
* @returns {Certificate} The decoded data structure.
*/
function _decode_Certificate(el) {
if (!_cached_decoder_for_Certificate) {
_cached_decoder_for_Certificate =
SIGNED_ta_1._get_decoder_for_SIGNED(TBSCertificate_ta_1._decode_TBSCertificate);
}
return _cached_decoder_for_Certificate(el);
}
exports._decode_Certificate = _decode_Certificate;
/* END_OF_SYMBOL_DEFINITION _decode_Certificate */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_Certificate */
let _cached_encoder_for_Certificate = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_Certificate */
/* START_OF_SYMBOL_DEFINITION _encode_Certificate */
/**
* @summary Encodes a(n) Certificate 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 Certificate, encoded as an ASN.1 Element.
*/
function _encode_Certificate(value, elGetter) {
if (!_cached_encoder_for_Certificate) {
_cached_encoder_for_Certificate =
SIGNED_ta_1._get_encoder_for_SIGNED(TBSCertificate_ta_1._encode_TBSCertificate);
}
return _cached_encoder_for_Certificate(value, elGetter);
}
exports._encode_Certificate = _encode_Certificate;
/* END_OF_SYMBOL_DEFINITION _encode_Certificate */
/* eslint-enable */
//# sourceMappingURL=Certificate.ta.js.map