UNPKG

@wildboar/pkcs

Version:
44 lines 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_Data = exports._decode_Data = void 0; const $ = require("asn1-ts/dist/node/functional"); /* END_OF_SYMBOL_DEFINITION Data */ /* START_OF_SYMBOL_DEFINITION _cached_decoder_for_Data */ let _cached_decoder_for_Data = null; /* END_OF_SYMBOL_DEFINITION _cached_decoder_for_Data */ /* START_OF_SYMBOL_DEFINITION _decode_Data */ /** * @summary Decodes an ASN.1 element into a(n) Data * @function * @param {_Element} el The element being decoded. * @returns {Data} The decoded data structure. */ function _decode_Data(el) { if (!_cached_decoder_for_Data) { _cached_decoder_for_Data = $._decodeOctetString; } return _cached_decoder_for_Data(el); } exports._decode_Data = _decode_Data; /* END_OF_SYMBOL_DEFINITION _decode_Data */ /* START_OF_SYMBOL_DEFINITION _cached_encoder_for_Data */ let _cached_encoder_for_Data = null; /* END_OF_SYMBOL_DEFINITION _cached_encoder_for_Data */ /* START_OF_SYMBOL_DEFINITION _encode_Data */ /** * @summary Encodes a(n) Data 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 Data, encoded as an ASN.1 Element. */ function _encode_Data(value, elGetter) { if (!_cached_encoder_for_Data) { _cached_encoder_for_Data = $._encodeOctetString; } return _cached_encoder_for_Data(value, elGetter); } exports._encode_Data = _encode_Data; /* END_OF_SYMBOL_DEFINITION _encode_Data */ /* eslint-enable */ //# sourceMappingURL=Data.ta.js.map