@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
49 lines • 2.75 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_UnsignedAttributes = exports._decode_UnsignedAttributes = exports._encode_Attribute = exports._decode_Attribute = exports.Attribute = void 0;
const $ = require("asn1-ts/dist/node/functional");
const Attribute_ta_1 = require("../CryptographicMessageSyntax/Attribute.ta");
var Attribute_ta_2 = require("../CryptographicMessageSyntax/Attribute.ta");
Object.defineProperty(exports, "Attribute", { enumerable: true, get: function () { return Attribute_ta_2.Attribute; } });
Object.defineProperty(exports, "_decode_Attribute", { enumerable: true, get: function () { return Attribute_ta_2._decode_Attribute; } });
Object.defineProperty(exports, "_encode_Attribute", { enumerable: true, get: function () { return Attribute_ta_2._encode_Attribute; } });
/* END_OF_SYMBOL_DEFINITION UnsignedAttributes */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_UnsignedAttributes */
let _cached_decoder_for_UnsignedAttributes = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_UnsignedAttributes */
/* START_OF_SYMBOL_DEFINITION _decode_UnsignedAttributes */
/**
* @summary Decodes an ASN.1 element into a(n) UnsignedAttributes
* @function
* @param {_Element} el The element being decoded.
* @returns {UnsignedAttributes} The decoded data structure.
*/
function _decode_UnsignedAttributes(el) {
if (!_cached_decoder_for_UnsignedAttributes) {
_cached_decoder_for_UnsignedAttributes = $._decodeSetOf(() => Attribute_ta_1._decode_Attribute);
}
return _cached_decoder_for_UnsignedAttributes(el);
}
exports._decode_UnsignedAttributes = _decode_UnsignedAttributes;
/* END_OF_SYMBOL_DEFINITION _decode_UnsignedAttributes */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_UnsignedAttributes */
let _cached_encoder_for_UnsignedAttributes = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_UnsignedAttributes */
/* START_OF_SYMBOL_DEFINITION _encode_UnsignedAttributes */
/**
* @summary Encodes a(n) UnsignedAttributes 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 UnsignedAttributes, encoded as an ASN.1 Element.
*/
function _encode_UnsignedAttributes(value, elGetter) {
if (!_cached_encoder_for_UnsignedAttributes) {
_cached_encoder_for_UnsignedAttributes = $._encodeSetOf(() => Attribute_ta_1._encode_Attribute, $.BER);
}
return _cached_encoder_for_UnsignedAttributes(value, elGetter);
}
exports._encode_UnsignedAttributes = _encode_UnsignedAttributes;
/* END_OF_SYMBOL_DEFINITION _encode_UnsignedAttributes */
/* eslint-enable */
//# sourceMappingURL=UnsignedAttributes.ta.js.map