encrypted_content_info.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { __decorate } from "tslib";
  2. import { AsnConstructedOctetStringConverter, AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, OctetString } from "@peculiar/asn1-schema";
  3. import { ContentEncryptionAlgorithmIdentifier } from "./types.js";
  4. let EncryptedContent = class EncryptedContent {
  5. value;
  6. constructedValue;
  7. constructor(params = {}) {
  8. Object.assign(this, params);
  9. }
  10. };
  11. __decorate([
  12. AsnProp({
  13. type: OctetString,
  14. context: 0,
  15. implicit: true,
  16. optional: true,
  17. })
  18. ], EncryptedContent.prototype, "value", void 0);
  19. __decorate([
  20. AsnProp({
  21. type: OctetString,
  22. converter: AsnConstructedOctetStringConverter,
  23. context: 0,
  24. implicit: true,
  25. optional: true,
  26. repeated: "sequence",
  27. })
  28. ], EncryptedContent.prototype, "constructedValue", void 0);
  29. EncryptedContent = __decorate([
  30. AsnType({ type: AsnTypeTypes.Choice })
  31. ], EncryptedContent);
  32. export { EncryptedContent };
  33. export class EncryptedContentInfo {
  34. contentType = "";
  35. contentEncryptionAlgorithm = new ContentEncryptionAlgorithmIdentifier();
  36. encryptedContent;
  37. constructor(params = {}) {
  38. Object.assign(this, params);
  39. }
  40. }
  41. __decorate([
  42. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  43. ], EncryptedContentInfo.prototype, "contentType", void 0);
  44. __decorate([
  45. AsnProp({ type: ContentEncryptionAlgorithmIdentifier })
  46. ], EncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
  47. __decorate([
  48. AsnProp({
  49. type: EncryptedContent,
  50. optional: true,
  51. })
  52. ], EncryptedContentInfo.prototype, "encryptedContent", void 0);