summary refs log tree commit diff
path: root/crypto/src/tls/HandshakeMessageInput.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/tls/HandshakeMessageInput.cs')
-rw-r--r--crypto/src/tls/HandshakeMessageInput.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/crypto/src/tls/HandshakeMessageInput.cs b/crypto/src/tls/HandshakeMessageInput.cs
new file mode 100644
index 000000000..d7cd19994
--- /dev/null
+++ b/crypto/src/tls/HandshakeMessageInput.cs
@@ -0,0 +1,22 @@
+using System;
+using System.IO;
+
+using Org.BouncyCastle.Tls.Crypto;
+using Org.BouncyCastle.Utilities.IO;
+
+namespace Org.BouncyCastle.Tls
+{
+    public sealed class HandshakeMessageInput
+        : MemoryStream
+    {
+        internal HandshakeMessageInput(byte[] buf, int offset, int length)
+            : base(buf, offset, length, false)
+        {
+        }
+
+        public void UpdateHash(TlsHash hash)
+        {
+            Streams.WriteBufTo(this, new TlsHashSink(hash));
+        }
+    }
+}