diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-30 11:15:39 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-30 11:15:39 +0700 |
commit | 633b1a5da2e9ad5323397616dbee05b3d7de5739 (patch) | |
tree | 5048f252d70c5fceea0ffbde04afbd3ad9ec7539 /crypto/src/tls/DigestInputBuffer.cs | |
parent | Null tmpBuffers when disposing (diff) | |
download | BouncyCastle.NET-ed25519-633b1a5da2e9ad5323397616dbee05b3d7de5739.tar.xz |
Refactoring around MemoryStream
Diffstat (limited to 'crypto/src/tls/DigestInputBuffer.cs')
-rw-r--r-- | crypto/src/tls/DigestInputBuffer.cs | 9 |
1 files changed, 3 insertions, 6 deletions
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)); } /// <exception cref="IOException"/> 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); } } } |