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/ServerNameList.cs | |
parent | Null tmpBuffers when disposing (diff) | |
download | BouncyCastle.NET-ed25519-633b1a5da2e9ad5323397616dbee05b3d7de5739.tar.xz |
Refactoring around MemoryStream
Diffstat (limited to 'crypto/src/tls/ServerNameList.cs')
-rw-r--r-- | crypto/src/tls/ServerNameList.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/tls/ServerNameList.cs b/crypto/src/tls/ServerNameList.cs index 358e82a67..248cf2f7f 100644 --- a/crypto/src/tls/ServerNameList.cs +++ b/crypto/src/tls/ServerNameList.cs @@ -43,10 +43,10 @@ namespace Org.BouncyCastle.Tls entry.Encode(buf); } - int length = (int)buf.Length; + int length = Convert.ToInt32(buf.Length); TlsUtilities.CheckUint16(length); TlsUtilities.WriteUint16(length, output); - Streams.WriteBufTo(buf, output); + buf.WriteTo(output); } /// <summary>Parse a <see cref="ServerNameList"/> from a <see cref="Stream"/>.</summary> |