recipient_info.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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, optional: true,
  33. })
  34. ], RecipientInfo.prototype, "ktri", void 0);
  35. __decorate([
  36. AsnProp({
  37. type: KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true,
  38. })
  39. ], RecipientInfo.prototype, "kari", void 0);
  40. __decorate([
  41. AsnProp({
  42. type: KEKRecipientInfo, context: 2, implicit: true, optional: true,
  43. })
  44. ], RecipientInfo.prototype, "kekri", void 0);
  45. __decorate([
  46. AsnProp({
  47. type: PasswordRecipientInfo, context: 3, implicit: true, optional: true,
  48. })
  49. ], RecipientInfo.prototype, "pwri", void 0);
  50. __decorate([
  51. AsnProp({
  52. type: OtherRecipientInfo, context: 4, implicit: true, optional: true,
  53. })
  54. ], RecipientInfo.prototype, "ori", void 0);
  55. RecipientInfo = __decorate([
  56. AsnType({ type: AsnTypeTypes.Choice })
  57. ], RecipientInfo);
  58. export { RecipientInfo };