ICipherBuilder.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
  6. {
  7. /// <summary>
  8. /// Base interface for cipher builders.
  9. /// </summary>
  10. public interface ICipherBuilder
  11. {
  12. /// <summary>
  13. /// Return the algorithm and parameter details associated with any cipher built.
  14. /// </summary>
  15. object AlgorithmDetails { get; }
  16. /// <summary>
  17. /// Return the maximum output size that a given input will produce.
  18. /// </summary>
  19. /// <param name="inputLen">the length of the expected input.</param>
  20. /// <returns>The maximum possible output size that can produced for the expected input length.</returns>
  21. int GetMaxOutputSize(int inputLen);
  22. /// <summary>
  23. /// Build a cipher that operates on the passed in stream.
  24. /// </summary>
  25. /// <param name="stream">The stream to write/read any encrypted/decrypted data.</param>
  26. /// <returns>A cipher based around the given stream.</returns>
  27. ICipher BuildCipher(Stream stream);
  28. }
  29. }
  30. #pragma warning restore
  31. #endif