DigestInputBuffer.cs 690 B

123456789101112131415161718192021222324252627
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. using Best.HTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto;
  6. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Tls
  7. {
  8. internal class DigestInputBuffer
  9. : MemoryStream
  10. {
  11. internal void UpdateDigest(TlsHash hash)
  12. {
  13. WriteTo(new TlsHashSink(hash));
  14. }
  15. /// <exception cref="IOException"/>
  16. internal void CopyInputTo(Stream output)
  17. {
  18. // TODO[tls] Consider defensive copy if 'output' might be external code
  19. WriteTo(output);
  20. }
  21. }
  22. }
  23. #pragma warning restore
  24. #endif