|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmessageProcessor.Recoder
final class Recoder
Recodes (decrypts/encrypts) messages. Prevents linkability of (incoming and outgoing) messages due to their appearance.
This class is thread-safe (but parallel execution of a single instance's
methods won't increase performance. For parallel processing, several
Recoder
s are needed).
Constructor Summary | |
---|---|
protected |
Recoder()
Constructor used to generate a Recoder used to encrypt
replies. |
protected |
Recoder(java.security.KeyPair keyPair)
Constructor used to generate a Recoder used to decrypt
requests. |
Method Summary | |
---|---|
protected byte[] |
decrypt(byte[] data,
java.lang.String transformation)
Decrypts the bypassed data using the internal asymmetric cipher (and private key) and the specified transformation. |
protected java.security.Key |
getPublicKey()
Returns the public key of this Recoder . |
protected Message |
recode(BasicMessage message)
Recodes (decrypts/encrypts) the bypassed message according to its type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Recoder(java.security.KeyPair keyPair)
Recoder
used to decrypt
requests.
Creates a new Recoder
which will use the bypassed
KeyPair
to decrypt messages.
Instantiates Cipher
objects for later use as specified in
the property file.
keyPair
- Public and private key of the asymmetric crypto system.protected Recoder()
Recoder
used to encrypt
replies.
Method Detail |
---|
protected java.security.Key getPublicKey()
Recoder
.
Recoder
.protected Message recode(BasicMessage message)
message
- The message to be recoded.
protected byte[] decrypt(byte[] data, java.lang.String transformation) throws java.lang.Exception
data
- Data to be decrypted.transformation
- Transformation that shall be used for
decryption.
java.lang.Exception
- Any type of error preventing the data from being
decrypted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |