TlsSrpConfig.cs 968 B

123456789101112131415161718192021222324252627282930
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  6. {
  7. /// <summary>Basic config for SRP.</summary>
  8. public class TlsSrpConfig
  9. {
  10. protected BigInteger[] m_explicitNG;
  11. /// <summary>Return the (N, g) values used in SRP-6.</summary>
  12. /// <returns>(N, g) as a BigInteger array (N=[0], g=[1]).</returns>
  13. public BigInteger[] GetExplicitNG()
  14. {
  15. return (BigInteger[])m_explicitNG.Clone();
  16. }
  17. /// <summary>Set the (N, g) values used for SRP-6.</summary>
  18. /// <param name="explicitNG">(N, g) as a BigInteger array (N=[0], g=[1]).</param>
  19. public void SetExplicitNG(BigInteger[] explicitNG)
  20. {
  21. this.m_explicitNG = (BigInteger[])explicitNG.Clone();
  22. }
  23. }
  24. }
  25. #pragma warning restore
  26. #endif