From 633b1a5da2e9ad5323397616dbee05b3d7de5739 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 30 Jun 2022 11:15:39 +0700 Subject: Refactoring around MemoryStream --- crypto/src/tls/DigestInputBuffer.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'crypto/src/tls/DigestInputBuffer.cs') diff --git a/crypto/src/tls/DigestInputBuffer.cs b/crypto/src/tls/DigestInputBuffer.cs index 9b4ea4b06..a5d53a02f 100644 --- a/crypto/src/tls/DigestInputBuffer.cs +++ b/crypto/src/tls/DigestInputBuffer.cs @@ -2,7 +2,6 @@ using System.IO; using Org.BouncyCastle.Tls.Crypto; -using Org.BouncyCastle.Utilities.IO; namespace Org.BouncyCastle.Tls { @@ -11,16 +10,14 @@ namespace Org.BouncyCastle.Tls { internal void UpdateDigest(TlsHash hash) { - Streams.WriteBufTo(this, new TlsHashSink(hash)); + WriteTo(new TlsHashSink(hash)); } /// internal void CopyInputTo(Stream output) { - // TODO[tls-port] - // NOTE: Copy data since the output here may be under control of external code. - //Streams.PipeAll(new MemoryStream(buf, 0, count), output); - Streams.WriteBufTo(this, output); + // TODO[tls] Consider defensive copy if 'output' might be external code + WriteTo(output); } } } -- cgit 1.4.1