UNPKG

pkcs-ts

Version:

PKCS #1 through #15 (Except #11) - Private and Public Keys, Certificates, and More

45 lines 3.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports._encode_KeyAgreeRecipientIdentifier = exports._decode_KeyAgreeRecipientIdentifier = exports._encode_RecipientKeyIdentifier = exports._decode_RecipientKeyIdentifier = exports.RecipientKeyIdentifier = exports._encode_IssuerAndSerialNumber = exports._decode_IssuerAndSerialNumber = exports.IssuerAndSerialNumber = void 0; const tslib_1 = require("tslib"); const asn1_ts_1 = require("asn1-ts"); const $ = tslib_1.__importStar(require("asn1-ts/dist/node/functional")); const IssuerAndSerialNumber_ta_1 = require("../CryptographicMessageSyntax/IssuerAndSerialNumber.ta"); const RecipientKeyIdentifier_ta_1 = require("../CryptographicMessageSyntax/RecipientKeyIdentifier.ta"); var IssuerAndSerialNumber_ta_2 = require("../CryptographicMessageSyntax/IssuerAndSerialNumber.ta"); Object.defineProperty(exports, "IssuerAndSerialNumber", { enumerable: true, get: function () { return IssuerAndSerialNumber_ta_2.IssuerAndSerialNumber; } }); Object.defineProperty(exports, "_decode_IssuerAndSerialNumber", { enumerable: true, get: function () { return IssuerAndSerialNumber_ta_2._decode_IssuerAndSerialNumber; } }); Object.defineProperty(exports, "_encode_IssuerAndSerialNumber", { enumerable: true, get: function () { return IssuerAndSerialNumber_ta_2._encode_IssuerAndSerialNumber; } }); var RecipientKeyIdentifier_ta_2 = require("../CryptographicMessageSyntax/RecipientKeyIdentifier.ta"); Object.defineProperty(exports, "RecipientKeyIdentifier", { enumerable: true, get: function () { return RecipientKeyIdentifier_ta_2.RecipientKeyIdentifier; } }); Object.defineProperty(exports, "_decode_RecipientKeyIdentifier", { enumerable: true, get: function () { return RecipientKeyIdentifier_ta_2._decode_RecipientKeyIdentifier; } }); Object.defineProperty(exports, "_encode_RecipientKeyIdentifier", { enumerable: true, get: function () { return RecipientKeyIdentifier_ta_2._encode_RecipientKeyIdentifier; } }); let _cached_decoder_for_KeyAgreeRecipientIdentifier = null; function _decode_KeyAgreeRecipientIdentifier(el) { if (!_cached_decoder_for_KeyAgreeRecipientIdentifier) { _cached_decoder_for_KeyAgreeRecipientIdentifier = $._decode_inextensible_choice({ "UNIVERSAL 16": [ "issuerAndSerialNumber", IssuerAndSerialNumber_ta_1._decode_IssuerAndSerialNumber, ], "CONTEXT 0": [ "rKeyId", $._decode_implicit(() => RecipientKeyIdentifier_ta_1._decode_RecipientKeyIdentifier), ], }); } return _cached_decoder_for_KeyAgreeRecipientIdentifier(el); } exports._decode_KeyAgreeRecipientIdentifier = _decode_KeyAgreeRecipientIdentifier; let _cached_encoder_for_KeyAgreeRecipientIdentifier = null; function _encode_KeyAgreeRecipientIdentifier(value, elGetter) { if (!_cached_encoder_for_KeyAgreeRecipientIdentifier) { _cached_encoder_for_KeyAgreeRecipientIdentifier = $._encode_choice({ issuerAndSerialNumber: IssuerAndSerialNumber_ta_1._encode_IssuerAndSerialNumber, rKeyId: $._encode_implicit(asn1_ts_1.ASN1TagClass.context, 0, () => RecipientKeyIdentifier_ta_1._encode_RecipientKeyIdentifier, $.BER), }, $.BER); } return _cached_encoder_for_KeyAgreeRecipientIdentifier(value, elGetter); } exports._encode_KeyAgreeRecipientIdentifier = _encode_KeyAgreeRecipientIdentifier; //# sourceMappingURL=KeyAgreeRecipientIdentifier.ta.js.map