diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-07-12 15:15:36 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-07-12 15:15:36 +0700 |
commit | 68c795fe81277f73aeb90d8ad4c6f4305f32c906 (patch) | |
tree | 59643344aafef91bbd4c4a3a7973deba3d837a00 /crypto/src/tls/HandshakeMessageInput.cs | |
parent | TLS test tweaks (diff) | |
download | BouncyCastle.NET-ed25519-68c795fe81277f73aeb90d8ad4c6f4305f32c906.tar.xz |
Port of new TLS API from bc-java
Diffstat (limited to 'crypto/src/tls/HandshakeMessageInput.cs')
-rw-r--r-- | crypto/src/tls/HandshakeMessageInput.cs | 22 |
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)); + } + } +} |