safe_bag.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  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. constructor(params = {}) {
  10. this.bagId = "";
  11. this.bagValue = new ArrayBuffer(0);
  12. Object.assign(this, params);
  13. }
  14. }
  15. exports.SafeBag = SafeBag;
  16. tslib_1.__decorate([
  17. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
  18. ], SafeBag.prototype, "bagId", void 0);
  19. tslib_1.__decorate([
  20. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any, context: 0 })
  21. ], SafeBag.prototype, "bagValue", void 0);
  22. tslib_1.__decorate([
  23. (0, asn1_schema_1.AsnProp)({ type: attribute_1.PKCS12Attribute, repeated: "set", optional: true })
  24. ], SafeBag.prototype, "bagAttributes", void 0);
  25. let SafeContents = SafeContents_1 = class SafeContents extends asn1_schema_1.AsnArray {
  26. constructor(items) {
  27. super(items);
  28. Object.setPrototypeOf(this, SafeContents_1.prototype);
  29. }
  30. };
  31. exports.SafeContents = SafeContents;
  32. exports.SafeContents = SafeContents = SafeContents_1 = tslib_1.__decorate([
  33. (0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: SafeBag })
  34. ], SafeContents);