diff options
Diffstat (limited to 'crypto/src/tls/ByteQueue.cs')
-rw-r--r-- | crypto/src/tls/ByteQueue.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/src/tls/ByteQueue.cs b/crypto/src/tls/ByteQueue.cs index e06ad6346..a92f79baf 100644 --- a/crypto/src/tls/ByteQueue.cs +++ b/crypto/src/tls/ByteQueue.cs @@ -193,6 +193,14 @@ namespace Org.BouncyCastle.Tls return TlsUtilities.ReadInt32(m_databuf, m_skipped); } + public short ReadUint8(int skip) + { + if (m_available < skip + 1) + throw new InvalidOperationException("Not enough data to read"); + + return TlsUtilities.ReadUint8(m_databuf, m_skipped + skip); + } + public int ReadUint16(int skip) { if (m_available < skip + 2) |