GroupExchangeHashData.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using Renci.SshNet.Common;
  3. namespace Renci.SshNet.Security
  4. {
  5. internal class GroupExchangeHashData : SshData
  6. {
  7. public string ServerVersion { get; set; }
  8. public string ClientVersion { get; set; }
  9. public byte[] ClientPayload { get; set; }
  10. public byte[] ServerPayload { get; set; }
  11. public byte[] HostKey { get; set; }
  12. public UInt32 MinimumGroupSize { get; set; }
  13. public UInt32 PreferredGroupSize { get; set; }
  14. public UInt32 MaximumGroupSize { get; set; }
  15. public BigInteger Prime { get; set; }
  16. public BigInteger SubGroup { get; set; }
  17. public BigInteger ClientExchangeValue { get; set; }
  18. public BigInteger ServerExchangeValue { get; set; }
  19. public BigInteger SharedKey { get; set; }
  20. protected override void LoadData()
  21. {
  22. throw new NotImplementedException();
  23. }
  24. protected override void SaveData()
  25. {
  26. this.Write(this.ClientVersion);
  27. this.Write(this.ServerVersion);
  28. this.WriteBinaryString(this.ClientPayload);
  29. this.WriteBinaryString(this.ServerPayload);
  30. this.WriteBinaryString(this.HostKey);
  31. this.Write(this.MinimumGroupSize);
  32. this.Write(this.PreferredGroupSize);
  33. this.Write(this.MaximumGroupSize);
  34. this.Write(this.Prime);
  35. this.Write(this.SubGroup);
  36. this.Write(this.ClientExchangeValue);
  37. this.Write(this.ServerExchangeValue);
  38. this.Write(this.SharedKey);
  39. }
  40. }
  41. }