safe_bag.js 1.0 KB

123456789101112131415161718192021222324252627282930
  1. var SafeContents_1;
  2. import { __decorate } from "tslib";
  3. import { AsnArray, AsnType, AsnTypeTypes, AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
  4. import { PKCS12Attribute } from "./attribute";
  5. export class SafeBag {
  6. constructor(params = {}) {
  7. this.bagId = "";
  8. this.bagValue = new ArrayBuffer(0);
  9. Object.assign(this, params);
  10. }
  11. }
  12. __decorate([
  13. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  14. ], SafeBag.prototype, "bagId", void 0);
  15. __decorate([
  16. AsnProp({ type: AsnPropTypes.Any, context: 0 })
  17. ], SafeBag.prototype, "bagValue", void 0);
  18. __decorate([
  19. AsnProp({ type: PKCS12Attribute, repeated: "set", optional: true })
  20. ], SafeBag.prototype, "bagAttributes", void 0);
  21. let SafeContents = SafeContents_1 = class SafeContents extends AsnArray {
  22. constructor(items) {
  23. super(items);
  24. Object.setPrototypeOf(this, SafeContents_1.prototype);
  25. }
  26. };
  27. SafeContents = SafeContents_1 = __decorate([
  28. AsnType({ type: AsnTypeTypes.Sequence, itemType: SafeBag })
  29. ], SafeContents);
  30. export { SafeContents };