UNPKG

@wildboar/pkcs

Version:
46 lines 2.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._get_encoder_for_ReferencedValue = exports._get_decoder_for_ReferencedValue = exports._encode_URL = exports._decode_URL = exports._encode_Path = exports._decode_Path = exports.Path = void 0; const $ = require("asn1-ts/dist/node/functional"); const Path_ta_1 = require("../PKCS-15/Path.ta"); const URL_ta_1 = require("../PKCS-15/URL.ta"); var Path_ta_2 = require("../PKCS-15/Path.ta"); Object.defineProperty(exports, "Path", { enumerable: true, get: function () { return Path_ta_2.Path; } }); Object.defineProperty(exports, "_decode_Path", { enumerable: true, get: function () { return Path_ta_2._decode_Path; } }); Object.defineProperty(exports, "_encode_Path", { enumerable: true, get: function () { return Path_ta_2._encode_Path; } }); var URL_ta_2 = require("../PKCS-15/URL.ta"); Object.defineProperty(exports, "_decode_URL", { enumerable: true, get: function () { return URL_ta_2._decode_URL; } }); Object.defineProperty(exports, "_encode_URL", { enumerable: true, get: function () { return URL_ta_2._encode_URL; } }); /* END_OF_SYMBOL_DEFINITION ReferencedValue */ /* START_OF_SYMBOL_DEFINITION _get_decoder_for_ReferencedValue */ /** * @summary Returns a function that will decode an ASN.1 element into a(n) ReferencedValue * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ function _get_decoder_for_ReferencedValue(_decode_Type) { return $._decode_inextensible_choice({ "UNIVERSAL 16": ["path", Path_ta_1._decode_Path], "UNIVERSAL 19": ["url", URL_ta_1._decode_URL], "CONTEXT 3": ["url", URL_ta_1._decode_URL], }); } exports._get_decoder_for_ReferencedValue = _get_decoder_for_ReferencedValue; /* END_OF_SYMBOL_DEFINITION _get_decoder_for_ReferencedValue */ /* START_OF_SYMBOL_DEFINITION _get_encoder_for_ReferencedValue */ /** * @summary Returns a function that will encode a(n) ReferencedValue into an ASN.1 Element. * @function * @returns A function that will encode a(n) ReferencedValue as an ASN.1 element. */ function _get_encoder_for_ReferencedValue(_encode_Type) { return $._encode_choice({ path: Path_ta_1._encode_Path, url: URL_ta_1._encode_URL, }, $.BER); } exports._get_encoder_for_ReferencedValue = _get_encoder_for_ReferencedValue; /* END_OF_SYMBOL_DEFINITION _get_encoder_for_ReferencedValue */ /* eslint-enable */ //# sourceMappingURL=ReferencedValue.ta.js.map