recipient_info.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { __decorate } from "tslib";
  2. import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
  3. import { KeyAgreeRecipientInfo } from "./key_agree_recipient_info";
  4. import { KeyTransRecipientInfo } from "./key_trans_recipient_info";
  5. import { KEKRecipientInfo } from "./kek_recipient_info";
  6. import { PasswordRecipientInfo } from "./password_recipient_info";
  7. export class OtherRecipientInfo {
  8. constructor(params = {}) {
  9. this.oriType = "";
  10. this.oriValue = new ArrayBuffer(0);
  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. constructor(params = {}) {
  22. Object.assign(this, params);
  23. }
  24. };
  25. __decorate([
  26. AsnProp({ type: KeyTransRecipientInfo, optional: true })
  27. ], RecipientInfo.prototype, "ktri", void 0);
  28. __decorate([
  29. AsnProp({ type: KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true })
  30. ], RecipientInfo.prototype, "kari", void 0);
  31. __decorate([
  32. AsnProp({ type: KEKRecipientInfo, context: 2, implicit: true, optional: true })
  33. ], RecipientInfo.prototype, "kekri", void 0);
  34. __decorate([
  35. AsnProp({ type: PasswordRecipientInfo, context: 3, implicit: true, optional: true })
  36. ], RecipientInfo.prototype, "pwri", void 0);
  37. __decorate([
  38. AsnProp({ type: OtherRecipientInfo, context: 4, implicit: true, optional: true })
  39. ], RecipientInfo.prototype, "ori", void 0);
  40. RecipientInfo = __decorate([
  41. AsnType({ type: AsnTypeTypes.Choice })
  42. ], RecipientInfo);
  43. export { RecipientInfo };