encrypted_content_info.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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, context: 0, implicit: true, optional: true,
  14. })
  15. ], EncryptedContent.prototype, "value", void 0);
  16. __decorate([
  17. AsnProp({
  18. type: OctetString,
  19. converter: AsnConstructedOctetStringConverter,
  20. context: 0,
  21. implicit: true,
  22. optional: true,
  23. repeated: "sequence",
  24. })
  25. ], EncryptedContent.prototype, "constructedValue", void 0);
  26. EncryptedContent = __decorate([
  27. AsnType({ type: AsnTypeTypes.Choice })
  28. ], EncryptedContent);
  29. export { EncryptedContent };
  30. export class EncryptedContentInfo {
  31. contentType = "";
  32. contentEncryptionAlgorithm = new ContentEncryptionAlgorithmIdentifier();
  33. encryptedContent;
  34. constructor(params = {}) {
  35. Object.assign(this, params);
  36. }
  37. }
  38. __decorate([
  39. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  40. ], EncryptedContentInfo.prototype, "contentType", void 0);
  41. __decorate([
  42. AsnProp({ type: ContentEncryptionAlgorithmIdentifier })
  43. ], EncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
  44. __decorate([
  45. AsnProp({
  46. type: EncryptedContent, optional: true,
  47. })
  48. ], EncryptedContentInfo.prototype, "encryptedContent", void 0);