kek_recipient_info.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.KEKRecipientInfo = exports.KEKIdentifier = void 0;
  4. const tslib_1 = require("tslib");
  5. const asn1_schema_1 = require("@peculiar/asn1-schema");
  6. const other_key_attribute_1 = require("./other_key_attribute");
  7. const types_1 = require("./types");
  8. class KEKIdentifier {
  9. keyIdentifier = new asn1_schema_1.OctetString();
  10. date;
  11. other;
  12. constructor(params = {}) {
  13. Object.assign(this, params);
  14. }
  15. }
  16. exports.KEKIdentifier = KEKIdentifier;
  17. tslib_1.__decorate([
  18. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
  19. ], KEKIdentifier.prototype, "keyIdentifier", void 0);
  20. tslib_1.__decorate([
  21. (0, asn1_schema_1.AsnProp)({
  22. type: asn1_schema_1.AsnPropTypes.GeneralizedTime, optional: true,
  23. })
  24. ], KEKIdentifier.prototype, "date", void 0);
  25. tslib_1.__decorate([
  26. (0, asn1_schema_1.AsnProp)({
  27. type: other_key_attribute_1.OtherKeyAttribute, optional: true,
  28. })
  29. ], KEKIdentifier.prototype, "other", void 0);
  30. class KEKRecipientInfo {
  31. version = types_1.CMSVersion.v4;
  32. kekid = new KEKIdentifier();
  33. keyEncryptionAlgorithm = new types_1.KeyEncryptionAlgorithmIdentifier();
  34. encryptedKey = new asn1_schema_1.OctetString();
  35. constructor(params = {}) {
  36. Object.assign(this, params);
  37. }
  38. }
  39. exports.KEKRecipientInfo = KEKRecipientInfo;
  40. tslib_1.__decorate([
  41. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
  42. ], KEKRecipientInfo.prototype, "version", void 0);
  43. tslib_1.__decorate([
  44. (0, asn1_schema_1.AsnProp)({ type: KEKIdentifier })
  45. ], KEKRecipientInfo.prototype, "kekid", void 0);
  46. tslib_1.__decorate([
  47. (0, asn1_schema_1.AsnProp)({ type: types_1.KeyEncryptionAlgorithmIdentifier })
  48. ], KEKRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
  49. tslib_1.__decorate([
  50. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
  51. ], KEKRecipientInfo.prototype, "encryptedKey", void 0);