safe_bag.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. "use strict";
  2. var SafeContents_1;
  3. Object.defineProperty(exports, "__esModule", { value: true });
  4. exports.SafeContents = exports.SafeBag = void 0;
  5. const tslib_1 = require("tslib");
  6. const asn1_schema_1 = require("@peculiar/asn1-schema");
  7. const attribute_1 = require("./attribute");
  8. class SafeBag {
  9. bagId = "";
  10. bagValue = new ArrayBuffer(0);
  11. bagAttributes;
  12. constructor(params = {}) {
  13. Object.assign(this, params);
  14. }
  15. }
  16. exports.SafeBag = SafeBag;
  17. tslib_1.__decorate([
  18. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
  19. ], SafeBag.prototype, "bagId", void 0);
  20. tslib_1.__decorate([
  21. (0, asn1_schema_1.AsnProp)({
  22. type: asn1_schema_1.AsnPropTypes.Any,
  23. context: 0,
  24. })
  25. ], SafeBag.prototype, "bagValue", void 0);
  26. tslib_1.__decorate([
  27. (0, asn1_schema_1.AsnProp)({
  28. type: attribute_1.PKCS12Attribute,
  29. repeated: "set",
  30. optional: true,
  31. })
  32. ], SafeBag.prototype, "bagAttributes", void 0);
  33. let SafeContents = SafeContents_1 = class SafeContents extends asn1_schema_1.AsnArray {
  34. constructor(items) {
  35. super(items);
  36. Object.setPrototypeOf(this, SafeContents_1.prototype);
  37. }
  38. };
  39. exports.SafeContents = SafeContents;
  40. exports.SafeContents = SafeContents = SafeContents_1 = tslib_1.__decorate([
  41. (0, asn1_schema_1.AsnType)({
  42. type: asn1_schema_1.AsnTypeTypes.Sequence,
  43. itemType: SafeBag,
  44. })
  45. ], SafeContents);