IBasicAgreement.cs 855 B

123456789101112131415161718192021222324252627282930313233
  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.Crypto
  6. {
  7. /**
  8. * The basic interface that basic Diffie-Hellman implementations
  9. * conforms to.
  10. */
  11. public interface IBasicAgreement
  12. {
  13. /**
  14. * initialise the agreement engine.
  15. */
  16. void Init(ICipherParameters parameters);
  17. /**
  18. * return the field size for the agreement algorithm in bytes.
  19. */
  20. int GetFieldSize();
  21. /**
  22. * given a public key from a given party calculate the next
  23. * message in the agreement sequence.
  24. */
  25. BigInteger CalculateAgreement(ICipherParameters pubKey);
  26. }
  27. }
  28. #pragma warning restore
  29. #endif