|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclient.Cryptography
final class Cryptography
Provides methods for de- and encrypting messages.
Constructor Summary | |
---|---|
protected |
Cryptography(java.security.Key[] publicKeysOfMixes)
Generates a new Cryptography object that can be used to de-
and encrypting messages (using the bypassed keys). |
Method Summary | |
---|---|
protected byte[] |
decryptReply(byte[] reply)
Decrypts the bypassed reply. |
protected Message |
encryptMessage(Message plaintextMessage,
int positionOfMixInCascade)
Encrypts the bypassed message (hybridly) for the specified mix. |
protected javax.crypto.spec.IvParameterSpec |
getSessionIVOfMix(int positionOfMixInCascade)
Returns the specified mix' initialization vector. |
protected javax.crypto.SecretKey |
getSessionKeyOfMix(int positionOfMixInCascade)
Returns the specified mix' session key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Cryptography(java.security.Key[] publicKeysOfMixes)
Cryptography
object that can be used to de-
and encrypting messages (using the bypassed keys).
publicKeysOfMixes
- Public keys of the cascade's mixes. The
first mix' key must be located at
publicKeysOfMixes[0]
.Method Detail |
---|
protected javax.crypto.SecretKey getSessionKeyOfMix(int positionOfMixInCascade)
positionOfMixInCascade
- The mix' position in the cascade, who's
session key shall be returned.
protected javax.crypto.spec.IvParameterSpec getSessionIVOfMix(int positionOfMixInCascade)
positionOfMixInCascade
- The mix' position in the cascade, who's
initialization vector shall be returned.
protected Message encryptMessage(Message plaintextMessage, int positionOfMixInCascade)
positionOfMixInCascade
- The mix' position in the cascade, the
message shall be encrypted for.plaintextMessage
- The message to be encrypted.
protected byte[] decryptReply(byte[] reply)
reply
- The reply to be decrypted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |