@wildboar/pki-stub
Version:
X.510 PKI-Stub ASN.1 data structures in TypeScript
47 lines • 2.49 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_RelativeDistinguishedName = exports._decode_RelativeDistinguishedName = void 0;
const $ = require("asn1-ts/dist/node/functional");
const AttributeTypeAndValue_ta_1 = require("../PKI-Stub/AttributeTypeAndValue.ta");
/* END_OF_SYMBOL_DEFINITION RelativeDistinguishedName */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_RelativeDistinguishedName */
let _cached_decoder_for_RelativeDistinguishedName = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_RelativeDistinguishedName */
/* START_OF_SYMBOL_DEFINITION _decode_RelativeDistinguishedName */
/**
* @summary Decodes an ASN.1 element into a(n) RelativeDistinguishedName
* @function
* @param {_Element} el The element being decoded.
* @returns {RelativeDistinguishedName} The decoded data structure.
*/
function _decode_RelativeDistinguishedName(el) {
if (!_cached_decoder_for_RelativeDistinguishedName) {
_cached_decoder_for_RelativeDistinguishedName =
$._decodeSetOf(() => AttributeTypeAndValue_ta_1._decode_AttributeTypeAndValue);
}
return _cached_decoder_for_RelativeDistinguishedName(el);
}
exports._decode_RelativeDistinguishedName = _decode_RelativeDistinguishedName;
/* END_OF_SYMBOL_DEFINITION _decode_RelativeDistinguishedName */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_RelativeDistinguishedName */
let _cached_encoder_for_RelativeDistinguishedName = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_RelativeDistinguishedName */
/* START_OF_SYMBOL_DEFINITION _encode_RelativeDistinguishedName */
/**
* @summary Encodes a(n) RelativeDistinguishedName 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 RelativeDistinguishedName, encoded as an ASN.1 Element.
*/
function _encode_RelativeDistinguishedName(value, elGetter) {
if (!_cached_encoder_for_RelativeDistinguishedName) {
_cached_encoder_for_RelativeDistinguishedName =
$._encodeSetOf(() => AttributeTypeAndValue_ta_1._encode_AttributeTypeAndValue, $.BER);
}
return _cached_encoder_for_RelativeDistinguishedName(value, elGetter);
}
exports._encode_RelativeDistinguishedName = _encode_RelativeDistinguishedName;
/* END_OF_SYMBOL_DEFINITION _encode_RelativeDistinguishedName */
/* eslint-enable */
//# sourceMappingURL=RelativeDistinguishedName.ta.js.map