|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.tor.cells.Cell
anon.tor.cells.RelayCell
public class RelayCell
| Field Summary | |
|---|---|
private boolean |
m_digestGenerated
|
private byte |
m_relayCommand
|
private java.lang.Integer |
m_streamID
|
static byte |
RELAY_BEGIN
|
static byte |
RELAY_CONNECTED
|
static byte |
RELAY_DATA
|
static byte |
RELAY_DROP
|
static byte |
RELAY_END
|
static byte |
RELAY_EXTEND
|
static byte |
RELAY_EXTENDED
|
static byte |
RELAY_RESOLVE
|
static byte |
RELAY_RESOLVED
|
static byte |
RELAY_SENDME
|
static byte |
RELAY_TRUNCATE
|
static byte |
RELAY_TRUNCATED
|
| Fields inherited from class anon.tor.cells.Cell |
|---|
CELL_PAYLOAD_SIZE, CELL_SIZE, m_payload |
| Constructor Summary | |
|---|---|
RelayCell()
Constructor for a relay cell |
|
RelayCell(int circID)
Constructor for a relay cell |
|
RelayCell(int circID,
byte[] payload,
int offset)
Constructor for a relay cell |
|
RelayCell(int circID,
byte relaycommand,
int streamid,
byte[] data)
Constructor |
|
| Method Summary | |
|---|---|
void |
checkDigest(org.bouncycastle.crypto.digests.SHA1Digest digest)
checks if the digest of the relay cell is correct |
private static byte[] |
createPayload(byte relaycommand,
int streamid,
byte[] data)
|
void |
doCryptography(MyAES engine)
encode the cell |
void |
generateDigest(org.bouncycastle.crypto.digests.SHA1Digest digest)
generates the digest for the relay cell |
byte[] |
getCellData()
creates a fixed-sized cell 2 bytes - circID 1 byte - command 509 bytes - payload |
byte |
getRelayCommand()
gets the command of the relay cell |
byte[] |
getRelayPayload()
gets the payload of the relay cell |
java.lang.Integer |
getStreamID()
gets the streamID of the relay cell |
| Methods inherited from class anon.tor.cells.Cell |
|---|
createCell, getCircuitID, getCommand, getPayload, setPayload |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte RELAY_BEGIN
public static final byte RELAY_DATA
public static final byte RELAY_END
public static final byte RELAY_CONNECTED
public static final byte RELAY_SENDME
public static final byte RELAY_EXTEND
public static final byte RELAY_EXTENDED
public static final byte RELAY_TRUNCATE
public static final byte RELAY_TRUNCATED
public static final byte RELAY_DROP
public static final byte RELAY_RESOLVE
public static final byte RELAY_RESOLVED
private byte m_relayCommand
private java.lang.Integer m_streamID
private boolean m_digestGenerated
| Constructor Detail |
|---|
public RelayCell()
public RelayCell(int circID)
circID - circID
public RelayCell(int circID,
byte[] payload,
int offset)
circID - circIDpayload - payloadoffset - offset
public RelayCell(int circID,
byte relaycommand,
int streamid,
byte[] data)
circID - circIDrelaycommand - relaycommandstreamid - streamIDdata - data| Method Detail |
|---|
public byte getRelayCommand()
public java.lang.Integer getStreamID()
public void generateDigest(org.bouncycastle.crypto.digests.SHA1Digest digest)
digest - digest
public void checkDigest(org.bouncycastle.crypto.digests.SHA1Digest digest)
throws java.lang.Exception
digest - digest
java.lang.Exception - if an error occurs
public void doCryptography(MyAES engine)
throws java.lang.Exception
engine - a cipher
java.lang.Exception
private static byte[] createPayload(byte relaycommand,
int streamid,
byte[] data)
public byte[] getCellData()
Cell
getCellData in class Cellpublic byte[] getRelayPayload()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||