safe_bag.js 1.1 KB

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