|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectanon.mixminion.message.ReplyBlock
public class ReplyBlock
| Field Summary | |
|---|---|
(package private) static int |
KEY_LEN
|
(package private) static long |
KEY_LIFETIME
|
private byte[] |
m_headerbytes
|
private byte[] |
m_longterm_secret
|
private java.lang.String |
m_myaddress
|
private RoutingInformation |
m_myrouting
|
private java.util.Vector |
m_path
|
private byte[] |
m_sharedSecret
|
private long |
m_timetolive
|
| Constructor Summary | |
|---|---|
ReplyBlock(RoutingInformation routingInfo,
byte[] header,
byte[] sharedsecret,
long time)
Constructor 2 used to instantiate a ReplyBlock Object, used to parse a ReplyBlock out of a message call parseReplyBlock(String) to complete iT! |
|
ReplyBlock(java.lang.String myaddress,
java.util.Vector path,
byte[] usersecret)
Constructor 1 used to build a replyblock, which is appended to a message call build() to complete it! |
|
| Method Summary | |
|---|---|
void |
buildBlock()
builds the replyHeader |
private static int |
byteToInt(byte[] b,
int offset)
Calculates the int value of a given ByteArray |
byte[] |
getHeaderBytes()
Returns the ReplyHeader as Bytes |
byte[] |
getReplyBlockasBytes()
Returns the Replyblock as described underwards |
java.lang.String |
getReplyBlockasString()
|
RoutingInformation |
getRouting()
Returns the RoutingInformation of the First Server in the Path of the ReplyBlock, needed for the Crossover-Point |
byte[] |
getSharedSecret()
Returns the End-to End shared Secret |
static java.util.Vector |
parseReplyBlocks(java.lang.String message,
byte[] block)
Parses a given payload for a ReplyBlock and returns it, return null, when no ReplyBlock is detected |
static java.lang.String |
removeRepyBlocks(java.lang.String message)
Removes a ascii-armored replyblock from a given payload |
boolean |
timetoliveIsOK()
tests whether the replyblock is not older then 3 months |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final int KEY_LEN
static final long KEY_LIFETIME
private byte[] m_sharedSecret
private java.util.Vector m_path
private byte[] m_longterm_secret
private RoutingInformation m_myrouting
private byte[] m_headerbytes
private java.lang.String m_myaddress
private long m_timetolive
| Constructor Detail |
|---|
public ReplyBlock(java.lang.String myaddress,
java.util.Vector path,
byte[] usersecret)
myadress - path - usersecret -
public ReplyBlock(RoutingInformation routingInfo,
byte[] header,
byte[] sharedsecret,
long time)
routingInfo - header - sharedsecret - time - | Method Detail |
|---|
public void buildBlock()
public byte[] getHeaderBytes()
public byte[] getSharedSecret()
public byte[] getReplyBlockasBytes()
public java.lang.String getReplyBlockasString()
public RoutingInformation getRouting()
public static java.util.Vector parseReplyBlocks(java.lang.String message,
byte[] block)
throws java.io.IOException
message - block -
java.io.IOException
public static java.lang.String removeRepyBlocks(java.lang.String message)
throws java.io.IOException
message -
java.io.IOExceptionpublic boolean timetoliveIsOK()
private static int byteToInt(byte[] b,
int offset)
b - offset -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||