IBasicAgreement.cs 761 B

123456789101112131415161718192021222324252627282930313233
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. using Org.BouncyCastle.Math;
  4. namespace Org.BouncyCastle.Crypto
  5. {
  6. /**
  7. * The basic interface that basic Diffie-Hellman implementations
  8. * conforms to.
  9. */
  10. public interface IBasicAgreement
  11. {
  12. /**
  13. * initialise the agreement engine.
  14. */
  15. void Init(ICipherParameters parameters);
  16. /**
  17. * return the field size for the agreement algorithm in bytes.
  18. */
  19. int GetFieldSize();
  20. /**
  21. * given a public key from a given party calculate the next
  22. * message in the agreement sequence.
  23. */
  24. BigInteger CalculateAgreement(ICipherParameters pubKey);
  25. }
  26. }
  27. #endif