safe_bag.js 1.1 KB

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