rfc3279.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import { __decorate } from "tslib";
  2. import { AsnType, AsnTypeTypes, AsnProp, AsnPropTypes, OctetString, AsnIntegerArrayBufferConverter, } from "@peculiar/asn1-schema";
  3. let FieldID = class FieldID {
  4. constructor(params = {}) {
  5. Object.assign(this, params);
  6. }
  7. };
  8. __decorate([
  9. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  10. ], FieldID.prototype, "fieldType", void 0);
  11. __decorate([
  12. AsnProp({ type: AsnPropTypes.Any })
  13. ], FieldID.prototype, "parameters", void 0);
  14. FieldID = __decorate([
  15. AsnType({ type: AsnTypeTypes.Sequence })
  16. ], FieldID);
  17. export { FieldID };
  18. export class ECPoint extends OctetString {
  19. }
  20. export class FieldElement extends OctetString {
  21. }
  22. let Curve = class Curve {
  23. constructor(params = {}) {
  24. Object.assign(this, params);
  25. }
  26. };
  27. __decorate([
  28. AsnProp({ type: AsnPropTypes.OctetString })
  29. ], Curve.prototype, "a", void 0);
  30. __decorate([
  31. AsnProp({ type: AsnPropTypes.OctetString })
  32. ], Curve.prototype, "b", void 0);
  33. __decorate([
  34. AsnProp({ type: AsnPropTypes.BitString, optional: true })
  35. ], Curve.prototype, "seed", void 0);
  36. Curve = __decorate([
  37. AsnType({ type: AsnTypeTypes.Sequence })
  38. ], Curve);
  39. export { Curve };
  40. export var ECPVer;
  41. (function (ECPVer) {
  42. ECPVer[ECPVer["ecpVer1"] = 1] = "ecpVer1";
  43. })(ECPVer || (ECPVer = {}));
  44. let SpecifiedECDomain = class SpecifiedECDomain {
  45. constructor(params = {}) {
  46. this.version = ECPVer.ecpVer1;
  47. Object.assign(this, params);
  48. }
  49. };
  50. __decorate([
  51. AsnProp({ type: AsnPropTypes.Integer })
  52. ], SpecifiedECDomain.prototype, "version", void 0);
  53. __decorate([
  54. AsnProp({ type: FieldID })
  55. ], SpecifiedECDomain.prototype, "fieldID", void 0);
  56. __decorate([
  57. AsnProp({ type: Curve })
  58. ], SpecifiedECDomain.prototype, "curve", void 0);
  59. __decorate([
  60. AsnProp({ type: ECPoint })
  61. ], SpecifiedECDomain.prototype, "base", void 0);
  62. __decorate([
  63. AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
  64. ], SpecifiedECDomain.prototype, "order", void 0);
  65. __decorate([
  66. AsnProp({ type: AsnPropTypes.Integer, optional: true })
  67. ], SpecifiedECDomain.prototype, "cofactor", void 0);
  68. SpecifiedECDomain = __decorate([
  69. AsnType({ type: AsnTypeTypes.Sequence })
  70. ], SpecifiedECDomain);
  71. export { SpecifiedECDomain };