recipient_info.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { __decorate } from "tslib";
  2. import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
  3. import { KeyAgreeRecipientInfo } from "./key_agree_recipient_info.js";
  4. import { KeyTransRecipientInfo } from "./key_trans_recipient_info.js";
  5. import { KEKRecipientInfo } from "./kek_recipient_info.js";
  6. import { PasswordRecipientInfo } from "./password_recipient_info.js";
  7. export class OtherRecipientInfo {
  8. oriType = "";
  9. oriValue = new ArrayBuffer(0);
  10. constructor(params = {}) {
  11. Object.assign(this, params);
  12. }
  13. }
  14. __decorate([
  15. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  16. ], OtherRecipientInfo.prototype, "oriType", void 0);
  17. __decorate([
  18. AsnProp({ type: AsnPropTypes.Any })
  19. ], OtherRecipientInfo.prototype, "oriValue", void 0);
  20. let RecipientInfo = class RecipientInfo {
  21. ktri;
  22. kari;
  23. kekri;
  24. pwri;
  25. ori;
  26. constructor(params = {}) {
  27. Object.assign(this, params);
  28. }
  29. };
  30. __decorate([
  31. AsnProp({
  32. type: KeyTransRecipientInfo,
  33. optional: true,
  34. })
  35. ], RecipientInfo.prototype, "ktri", void 0);
  36. __decorate([
  37. AsnProp({
  38. type: KeyAgreeRecipientInfo,
  39. context: 1,
  40. implicit: true,
  41. optional: true,
  42. })
  43. ], RecipientInfo.prototype, "kari", void 0);
  44. __decorate([
  45. AsnProp({
  46. type: KEKRecipientInfo,
  47. context: 2,
  48. implicit: true,
  49. optional: true,
  50. })
  51. ], RecipientInfo.prototype, "kekri", void 0);
  52. __decorate([
  53. AsnProp({
  54. type: PasswordRecipientInfo,
  55. context: 3,
  56. implicit: true,
  57. optional: true,
  58. })
  59. ], RecipientInfo.prototype, "pwri", void 0);
  60. __decorate([
  61. AsnProp({
  62. type: OtherRecipientInfo,
  63. context: 4,
  64. implicit: true,
  65. optional: true,
  66. })
  67. ], RecipientInfo.prototype, "ori", void 0);
  68. RecipientInfo = __decorate([
  69. AsnType({ type: AsnTypeTypes.Choice })
  70. ], RecipientInfo);
  71. export { RecipientInfo };