TlsSrp6Client.cs 1.2 KB

12345678910111213141516171819202122232425262728
  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 client implementation.</summary>
  9. public interface TlsSrp6Client
  10. {
  11. /// <summary>Generates the secret S given the server's credentials</summary>
  12. /// <param name="serverB">The server's credentials</param>
  13. /// <returns>Client's verification message for the server</returns>
  14. /// <exception cref="IOException">If server's credentials are invalid</exception>
  15. BigInteger CalculateSecret(BigInteger serverB);
  16. /// <summary>Generates client's credentials given the client's salt, identity and password</summary>
  17. /// <param name="salt">The salt used in the client's verifier.</param>
  18. /// <param name="identity">The user's identity (eg. username)</param>
  19. /// <param name="password">The user's password</param>
  20. /// <returns>Client's public value to send to server</returns>
  21. BigInteger GenerateClientCredentials(byte[] salt, byte[] identity, byte[] password);
  22. }
  23. }
  24. #pragma warning restore
  25. #endif