1 files changed, 9 insertions, 7 deletions
diff --git a/crypto/src/crypto/io/MacSink.cs b/crypto/src/crypto/io/MacSink.cs
index c4fe7169a..aa72e9047 100644
--- a/crypto/src/crypto/io/MacSink.cs
+++ b/crypto/src/crypto/io/MacSink.cs
@@ -19,17 +19,19 @@ namespace Org.BouncyCastle.Crypto.IO
get { return mMac; }
}
- public override void WriteByte(byte b)
+ public override void Write(byte[] buffer, int offset, int count)
{
- mMac.Update(b);
- }
+ Streams.ValidateBufferArguments(buffer, offset, count);
- public override void Write(byte[] buf, int off, int len)
- {
- if (len > 0)
+ if (count > 0)
{
- mMac.BlockUpdate(buf, off, len);
+ mMac.BlockUpdate(buffer, offset, count);
}
}
+
+ public override void WriteByte(byte value)
+ {
+ mMac.Update(value);
+ }
}
}
|