diff options
Diffstat (limited to 'crypto/src/tls/HandshakeMessageInput.cs')
-rw-r--r-- | crypto/src/tls/HandshakeMessageInput.cs | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/crypto/src/tls/HandshakeMessageInput.cs b/crypto/src/tls/HandshakeMessageInput.cs index 8d9a291d7..9224e0db7 100644 --- a/crypto/src/tls/HandshakeMessageInput.cs +++ b/crypto/src/tls/HandshakeMessageInput.cs @@ -2,7 +2,6 @@ using System.IO; using Org.BouncyCastle.Tls.Crypto; -using Org.BouncyCastle.Utilities.IO; namespace Org.BouncyCastle.Tls { @@ -13,46 +12,28 @@ namespace Org.BouncyCastle.Tls private readonly int m_offset; internal HandshakeMessageInput(byte[] buf, int offset, int length) -#if PORTABLE - : base(buf, offset, length, false) -#else : base(buf, offset, length, false, true) -#endif { -#if PORTABLE - this.m_offset = 0; -#else - this.m_offset = offset; -#endif + m_offset = offset; } public void UpdateHash(TlsHash hash) { - Streams.WriteBufTo(this, new TlsHashSink(hash)); + WriteTo(new TlsHashSink(hash)); } internal void UpdateHashPrefix(TlsHash hash, int bindersSize) { -#if PORTABLE - byte[] buf = ToArray(); - int count = buf.Length; -#else byte[] buf = GetBuffer(); - int count = (int)Length; -#endif + int count = Convert.ToInt32(Length); hash.Update(buf, m_offset, count - bindersSize); } internal void UpdateHashSuffix(TlsHash hash, int bindersSize) { -#if PORTABLE - byte[] buf = ToArray(); - int count = buf.Length; -#else byte[] buf = GetBuffer(); - int count = (int)Length; -#endif + int count = Convert.ToInt32(Length); hash.Update(buf, m_offset + count - bindersSize, bindersSize); } |