TlsHash.cs 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  5. {
  6. /// <summary>Interface for message digest, or hash, services.</summary>
  7. public interface TlsHash
  8. {
  9. /// <summary>Update the hash with the passed in input.</summary>
  10. /// <param name="input">input array containing the data.</param>
  11. /// <param name="inOff">offset into the input array the input starts at.</param>
  12. /// <param name="length">the length of the input data.</param>
  13. void Update(byte[] input, int inOff, int length);
  14. /// <summary>Return calculated hash for any input passed in.</summary>
  15. /// <returns>the hash value.</returns>
  16. byte[] CalculateHash();
  17. /// <summary>Return a clone of this hash object representing its current state.</summary>
  18. /// <returns>a clone of the current hash.</returns>
  19. TlsHash CloneHash();
  20. /// <summary>Reset the hash underlying this service.</summary>
  21. void Reset();
  22. }
  23. }
  24. #pragma warning restore
  25. #endif