encrypted_content_info.js 1.5 KB

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