pkcs-ts
Version:
PKCS #1 through #15 (Except #11) - Private and Public Keys, Certificates, and More
45 lines • 3.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_ExternalAuthObjectAttributes = exports._decode_ExternalAuthObjectAttributes = exports._encode_CertBasedAuthenticationAttributes = exports._decode_CertBasedAuthenticationAttributes = exports.CertBasedAuthenticationAttributes = exports._encode_AuthKeyAttributes = exports._decode_AuthKeyAttributes = exports.AuthKeyAttributes = 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 AuthKeyAttributes_ta_1 = require("../PKCS-15/AuthKeyAttributes.ta");
const CertBasedAuthenticationAttributes_ta_1 = require("../PKCS-15/CertBasedAuthenticationAttributes.ta");
var AuthKeyAttributes_ta_2 = require("../PKCS-15/AuthKeyAttributes.ta");
Object.defineProperty(exports, "AuthKeyAttributes", { enumerable: true, get: function () { return AuthKeyAttributes_ta_2.AuthKeyAttributes; } });
Object.defineProperty(exports, "_decode_AuthKeyAttributes", { enumerable: true, get: function () { return AuthKeyAttributes_ta_2._decode_AuthKeyAttributes; } });
Object.defineProperty(exports, "_encode_AuthKeyAttributes", { enumerable: true, get: function () { return AuthKeyAttributes_ta_2._encode_AuthKeyAttributes; } });
var CertBasedAuthenticationAttributes_ta_2 = require("../PKCS-15/CertBasedAuthenticationAttributes.ta");
Object.defineProperty(exports, "CertBasedAuthenticationAttributes", { enumerable: true, get: function () { return CertBasedAuthenticationAttributes_ta_2.CertBasedAuthenticationAttributes; } });
Object.defineProperty(exports, "_decode_CertBasedAuthenticationAttributes", { enumerable: true, get: function () { return CertBasedAuthenticationAttributes_ta_2._decode_CertBasedAuthenticationAttributes; } });
Object.defineProperty(exports, "_encode_CertBasedAuthenticationAttributes", { enumerable: true, get: function () { return CertBasedAuthenticationAttributes_ta_2._encode_CertBasedAuthenticationAttributes; } });
let _cached_decoder_for_ExternalAuthObjectAttributes = null;
function _decode_ExternalAuthObjectAttributes(el) {
if (!_cached_decoder_for_ExternalAuthObjectAttributes) {
_cached_decoder_for_ExternalAuthObjectAttributes = $._decode_extensible_choice({
"UNIVERSAL 16": [
"authKeyAttributes",
AuthKeyAttributes_ta_1._decode_AuthKeyAttributes,
],
"CONTEXT 0": [
"certBasedAttributes",
$._decode_implicit(() => CertBasedAuthenticationAttributes_ta_1._decode_CertBasedAuthenticationAttributes),
],
});
}
return _cached_decoder_for_ExternalAuthObjectAttributes(el);
}
exports._decode_ExternalAuthObjectAttributes = _decode_ExternalAuthObjectAttributes;
let _cached_encoder_for_ExternalAuthObjectAttributes = null;
function _encode_ExternalAuthObjectAttributes(value, elGetter) {
if (!_cached_encoder_for_ExternalAuthObjectAttributes) {
_cached_encoder_for_ExternalAuthObjectAttributes = $._encode_choice({
authKeyAttributes: AuthKeyAttributes_ta_1._encode_AuthKeyAttributes,
certBasedAttributes: $._encode_implicit(asn1_ts_1.ASN1TagClass.context, 0, () => CertBasedAuthenticationAttributes_ta_1._encode_CertBasedAuthenticationAttributes, $.BER),
}, $.BER);
}
return _cached_encoder_for_ExternalAuthObjectAttributes(value, elGetter);
}
exports._encode_ExternalAuthObjectAttributes = _encode_ExternalAuthObjectAttributes;
//# sourceMappingURL=ExternalAuthObjectAttributes.ta.js.map