|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
void |
addMessage(Message msg)
This method concats two messages and put an 'at' symbol between them so that we can divide it later with the method getAllFields for example This means that a Message should never contain the symbol 'at' It is advised to only use Base64 string in the message to avoid any issue |
void |
decrypt(java.lang.String algorithm,
java.security.Key key)
Decrypt the message with a given key, using the given algorithm. |
void |
encrypt(java.lang.String algorithm,
java.security.Key key)
Encrypts the message with the given key, using the given algorithm, and put the result in Base64 format |
boolean |
equals(Message other)
Check if the Message is equal to another one |
IMessage[] |
getAllFields()
Returns an array containing the different parts of a message, ie the different messages that have been concatenated in order to build this message |
java.lang.String |
getString()
This method returns the value of the protected member string It is especially useful to send a message to another host |
void |
hash()
This method hashes the Message |
void |
setString(java.lang.String string)
Change the value of the private member string into the given string It is advised to only use Base64 string in the message to avoid any issue |
Method Detail |
public java.lang.String getString()
public void setString(java.lang.String string)
string
- new value for the content of the messagepublic void addMessage(Message msg)
msg
- public IMessage[] getAllFields()
public void encrypt(java.lang.String algorithm, java.security.Key key) throws java.lang.Exception
algorithm
- algorithm to use for encryptionkey
- key to use for encryption
java.lang.Exception
public void decrypt(java.lang.String algorithm, java.security.Key key) throws java.lang.Exception
algorithm
- algorithm to use for decryptionkey
- key to use for decryption
java.lang.Exception
public void hash() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public boolean equals(Message other)
other
- the other Message
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |