TlsSrp6Server.cs 1.0 KB

1234567891011121314151617181920212223242526
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
  6. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  7. {
  8. /// <summary>Basic interface for an SRP-6 server implementation.</summary>
  9. public interface TlsSrp6Server
  10. {
  11. /// <summary>Generates the server's credentials that are to be sent to the client.</summary>
  12. /// <returns>The server's public value to the client</returns>
  13. BigInteger GenerateServerCredentials();
  14. /// <summary>Processes the client's credentials. If valid the shared secret is generated and returned.
  15. /// </summary>
  16. /// <param name="clientA">The client's credentials.</param>
  17. /// <returns>A shared secret <see cref="BigInteger"/>.</returns>
  18. /// <exception cref="IOException">If client's credentials are invalid.</exception>
  19. BigInteger CalculateSecret(BigInteger clientA);
  20. }
  21. }
  22. #pragma warning restore
  23. #endif