IStreamCalculator.cs 960 B

1234567891011121314151617181920212223242526
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System.IO;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto
  5. {
  6. /// <summary>
  7. /// Base interface for cryptographic operations such as Hashes, MACs, and Signatures which reduce a stream of data
  8. /// to a single value.
  9. /// </summary>
  10. public interface IStreamCalculator<out TResult>
  11. {
  12. /// <summary>Return a "sink" stream which only exists to update the implementing object.</summary>
  13. /// <returns>A stream to write to in order to update the implementing object.</returns>
  14. Stream Stream { get; }
  15. /// <summary>
  16. /// Return the result of processing the stream. This value is only available once the stream
  17. /// has been closed.
  18. /// </summary>
  19. /// <returns>The result of processing the stream.</returns>
  20. TResult GetResult();
  21. }
  22. }
  23. #pragma warning restore
  24. #endif