1 files changed, 9 insertions, 7 deletions
diff --git a/crypto/src/tls/crypto/TlsMacSink.cs b/crypto/src/tls/crypto/TlsMacSink.cs
index 58e65c731..e7d5c70d7 100644
--- a/crypto/src/tls/crypto/TlsMacSink.cs
+++ b/crypto/src/tls/crypto/TlsMacSink.cs
@@ -19,17 +19,19 @@ namespace Org.BouncyCastle.Tls.Crypto
get { return m_mac; }
}
- public override void WriteByte(byte b)
+ public override void Write(byte[] buffer, int offset, int count)
{
- m_mac.Update(new byte[]{ b }, 0, 1);
- }
+ Streams.ValidateBufferArguments(buffer, offset, count);
- public override void Write(byte[] buf, int off, int len)
- {
- if (len > 0)
+ if (count > 0)
{
- m_mac.Update(buf, off, len);
+ m_mac.Update(buffer, offset, count);
}
}
+
+ public override void WriteByte(byte value)
+ {
+ m_mac.Update(new byte[]{ value }, 0, 1);
+ }
}
}
|