|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclient.MessageGenerator
final class MessageGenerator
Provides methods for generating messages (the mixes are capable of processing) from byte arrays.
Constructor Summary | |
---|---|
protected |
MessageGenerator(int numberOfMixesInCascade,
Cryptography cryptography)
Generates a new MessageGenerator for generating messages
(the mixes are capable of processing) from byte arrays. |
Method Summary | |
---|---|
protected byte[] |
generateChannelEstablishMessage(byte[] bytePayload)
Generates a message which consists of one or more (encrypted) layers, the cascade's mixes are capable of processing from the bypassed data (Type: ChannelEstablishMessage ). |
protected byte[] |
generateChannelMessage(byte[] bytePayload)
Generates a message which consists of one or more (encrypted) layers, the cascade's mixes are capable of processing from the bypassed data (Type: ChannelMessage ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected MessageGenerator(int numberOfMixesInCascade, Cryptography cryptography)
MessageGenerator
for generating messages
(the mixes are capable of processing) from byte arrays.
numberOfMixesInCascade
- Number of mixes in the cascade this
Client
shall use.cryptography
- Reference on Cryptography
object that shall be used to encrypt
messages.Method Detail |
---|
protected byte[] generateChannelEstablishMessage(byte[] bytePayload) throws MessageTooLongException
ChannelEstablishMessage
). A layer is added for each
mix in the cascade.
bytePayload
- Data to generate the mix message from.
ChannelEstablishMessage
as a byte array.
MessageTooLongException
- Thrown when the bypassed message is
larger than the maximum message
size.protected byte[] generateChannelMessage(byte[] bytePayload) throws MessageTooLongException
ChannelMessage
). A layer is added for each mix in
the cascade.
bytePayload
- Data to generate the mix message from.
ChannelMessage
as a byte
array.
MessageTooLongException
- Thrown when the bypassed message is
larger than the maximum message
size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |