safe_bag.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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, context: 0,
  23. })
  24. ], SafeBag.prototype, "bagValue", void 0);
  25. tslib_1.__decorate([
  26. (0, asn1_schema_1.AsnProp)({
  27. type: attribute_1.PKCS12Attribute, repeated: "set", optional: true,
  28. })
  29. ], SafeBag.prototype, "bagAttributes", void 0);
  30. let SafeContents = SafeContents_1 = class SafeContents extends asn1_schema_1.AsnArray {
  31. constructor(items) {
  32. super(items);
  33. Object.setPrototypeOf(this, SafeContents_1.prototype);
  34. }
  35. };
  36. exports.SafeContents = SafeContents;
  37. exports.SafeContents = SafeContents = SafeContents_1 = tslib_1.__decorate([
  38. (0, asn1_schema_1.AsnType)({
  39. type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: SafeBag,
  40. })
  41. ], SafeContents);