public class TransportConnection
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) CipherInputStream |
cis |
(package private) CipherOutputStream |
cos |
(package private) ClientServerHello |
csh |
private static Logger |
log |
(package private) MAC |
recv_mac |
(package private) byte[] |
recv_mac_buffer |
(package private) byte[] |
recv_mac_buffer_cmp |
(package private) byte[] |
recv_packet_header_buffer |
(package private) boolean |
recv_packet_header_present |
(package private) int |
recv_padd_blocksize |
(package private) byte[] |
recv_padding_buffer |
(package private) int |
recv_seq_number |
(package private) java.security.SecureRandom |
rnd |
(package private) MAC |
send_mac |
(package private) byte[] |
send_mac_buffer |
(package private) byte[] |
send_packet_header_buffer |
(package private) int |
send_padd_blocksize |
(package private) byte[] |
send_padding_buffer |
(package private) int |
send_seq_number |
(package private) boolean |
useRandomPadding |
| Constructor and Description |
|---|
TransportConnection(java.io.InputStream is,
java.io.OutputStream os,
java.security.SecureRandom rnd) |
| Modifier and Type | Method and Description |
|---|---|
void |
changeRecvCipher(BlockCipher bc,
MAC mac) |
void |
changeSendCipher(BlockCipher bc,
MAC mac) |
int |
getPacketOverheadEstimate() |
int |
peekNextMessageLength() |
int |
receiveMessage(byte[] buffer,
int off,
int len) |
void |
sendMessage(byte[] message) |
void |
sendMessage(byte[] message,
int off,
int len) |
void |
sendMessage(byte[] message,
int off,
int len,
int padd) |
private static final Logger log
int send_seq_number
int recv_seq_number
CipherInputStream cis
CipherOutputStream cos
boolean useRandomPadding
MAC send_mac
byte[] send_mac_buffer
int send_padd_blocksize
MAC recv_mac
byte[] recv_mac_buffer
byte[] recv_mac_buffer_cmp
int recv_padd_blocksize
final byte[] send_padding_buffer
final byte[] send_packet_header_buffer
final byte[] recv_padding_buffer
final byte[] recv_packet_header_buffer
boolean recv_packet_header_present
ClientServerHello csh
final java.security.SecureRandom rnd
public TransportConnection(java.io.InputStream is,
java.io.OutputStream os,
java.security.SecureRandom rnd)
public void changeRecvCipher(BlockCipher bc, MAC mac)
public void changeSendCipher(BlockCipher bc, MAC mac)
public void sendMessage(byte[] message)
throws java.io.IOException
java.io.IOExceptionpublic void sendMessage(byte[] message,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic int getPacketOverheadEstimate()
public void sendMessage(byte[] message,
int off,
int len,
int padd)
throws java.io.IOException
java.io.IOExceptionpublic int peekNextMessageLength()
throws java.io.IOException
java.io.IOExceptionpublic int receiveMessage(byte[] buffer,
int off,
int len)
throws java.io.IOException
java.io.IOException