org.bouncycastle.crypto.tls

Class RecordStream


public class RecordStream
extends java.lang.Object

An implementation of the TLS 1.0 record layer.

Field Summary

protected CombinedHash
hash1
protected CombinedHash
hash2
protected TlsCipherSuite
readSuite
protected TlsCipherSuite
writeSuite

Constructor Summary

RecordStream(TlsProtocolHandler handler, InputStream is, OutputStream os)

Method Summary

protected void
close()
protected byte[]
decodeAndVerify(short type, InputStream is, int len)
protected void
flush()
void
readData()
protected void
writeMessage(short type, byte[] message, int offset, int len)

Field Details

hash1

protected CombinedHash hash1

hash2

protected CombinedHash hash2

readSuite

protected TlsCipherSuite readSuite

writeSuite

protected TlsCipherSuite writeSuite

Constructor Details

RecordStream

protected RecordStream(TlsProtocolHandler handler,
                       InputStream is,
                       OutputStream os)

Method Details

close

protected void close()
            throws IOException

decodeAndVerify

protected byte[] decodeAndVerify(short type,
                                 InputStream is,
                                 int len)
            throws IOException

flush

protected void flush()
            throws IOException

readData

public void readData()
            throws IOException

writeMessage

protected void writeMessage(short type,
                            byte[] message,
                            int offset,
                            int len)
            throws IOException