@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
48 lines • 3.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._get_encoder_for_KeyInfo = exports._get_decoder_for_KeyInfo = exports._encode_Reference = exports._decode_Reference = exports._get_encoder_for_KeyInfo_paramsAndOps = exports._get_decoder_for_KeyInfo_paramsAndOps = exports.KeyInfo_paramsAndOps = void 0;
const $ = require("asn1-ts/dist/node/functional");
const KeyInfo_paramsAndOps_ta_1 = require("../PKCS-15/KeyInfo-paramsAndOps.ta");
const Reference_ta_1 = require("../PKCS-15/Reference.ta");
var KeyInfo_paramsAndOps_ta_2 = require("../PKCS-15/KeyInfo-paramsAndOps.ta");
Object.defineProperty(exports, "KeyInfo_paramsAndOps", { enumerable: true, get: function () { return KeyInfo_paramsAndOps_ta_2.KeyInfo_paramsAndOps; } });
Object.defineProperty(exports, "_get_decoder_for_KeyInfo_paramsAndOps", { enumerable: true, get: function () { return KeyInfo_paramsAndOps_ta_2._get_decoder_for_KeyInfo_paramsAndOps; } });
Object.defineProperty(exports, "_get_encoder_for_KeyInfo_paramsAndOps", { enumerable: true, get: function () { return KeyInfo_paramsAndOps_ta_2._get_encoder_for_KeyInfo_paramsAndOps; } });
var Reference_ta_2 = require("../PKCS-15/Reference.ta");
Object.defineProperty(exports, "_decode_Reference", { enumerable: true, get: function () { return Reference_ta_2._decode_Reference; } });
Object.defineProperty(exports, "_encode_Reference", { enumerable: true, get: function () { return Reference_ta_2._encode_Reference; } });
/* END_OF_SYMBOL_DEFINITION KeyInfo */
/* START_OF_SYMBOL_DEFINITION _get_decoder_for_KeyInfo */
/**
* @summary Returns a function that will decode an ASN.1 element into a(n) KeyInfo
* @function
* @param {_Element} el The element being decoded.
* @returns A function that will decode an ASN.1 element.
*/
function _get_decoder_for_KeyInfo(_decode_ParameterType, _decode_OperationsType) {
return $._decode_inextensible_choice({
"UNIVERSAL 2": ["reference", Reference_ta_1._decode_Reference],
"UNIVERSAL 16": [
"paramsAndOps",
KeyInfo_paramsAndOps_ta_1._get_decoder_for_KeyInfo_paramsAndOps(_decode_ParameterType, _decode_OperationsType),
],
});
}
exports._get_decoder_for_KeyInfo = _get_decoder_for_KeyInfo;
/* END_OF_SYMBOL_DEFINITION _get_decoder_for_KeyInfo */
/* START_OF_SYMBOL_DEFINITION _get_encoder_for_KeyInfo */
/**
* @summary Returns a function that will encode a(n) KeyInfo into an ASN.1 Element.
* @function
* @returns A function that will encode a(n) KeyInfo as an ASN.1 element.
*/
function _get_encoder_for_KeyInfo(_encode_ParameterType, _encode_OperationsType) {
return $._encode_choice({
reference: Reference_ta_1._encode_Reference,
paramsAndOps: KeyInfo_paramsAndOps_ta_1._get_encoder_for_KeyInfo_paramsAndOps(_encode_ParameterType, _encode_OperationsType),
}, $.BER);
}
exports._get_encoder_for_KeyInfo = _get_encoder_for_KeyInfo;
/* END_OF_SYMBOL_DEFINITION _get_encoder_for_KeyInfo */
/* eslint-enable */
//# sourceMappingURL=KeyInfo.ta.js.map