forked from I2P_Developers/i2p.i2p
javadocs
This commit is contained in:
@ -61,7 +61,8 @@ public class ElGamalAESEngine {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrypt the message using the given private key using tags from the default key manager.
|
||||
* Decrypt the message using the given private key using tags from the default key manager,
|
||||
* which is the router's key manager. Use extreme care if you aren't the router.
|
||||
*
|
||||
* @deprecated specify the key manager!
|
||||
*/
|
||||
@ -75,6 +76,10 @@ public class ElGamalAESEngine {
|
||||
* This works according to the
|
||||
* ElGamal+AES algorithm in the data structure spec.
|
||||
*
|
||||
* Warning - use the correct SessionKeyManager. Clients should instantiate their own.
|
||||
* Clients using I2PAppContext.sessionKeyManager() may be correlated with the router,
|
||||
* unless you are careful to use different keys.
|
||||
*
|
||||
* @return decrypted data or null on failure
|
||||
*/
|
||||
public byte[] decrypt(byte data[], PrivateKey targetPrivateKey, SessionKeyManager keyManager) throws DataFormatException {
|
||||
|
@ -59,7 +59,8 @@ public class SessionKeyManager {
|
||||
* Associate a new session key with the specified target. Metrics to determine
|
||||
* when to expire that key begin with this call.
|
||||
*
|
||||
* @deprecated racy
|
||||
* Racy if called after getCurrentKey() to check for a current session;
|
||||
* use getCurrentOrNewKey() in that case.
|
||||
*/
|
||||
public void createSession(PublicKey target, SessionKey key) { // nop
|
||||
}
|
||||
@ -67,7 +68,8 @@ public class SessionKeyManager {
|
||||
/**
|
||||
* Generate a new session key and associate it with the specified target.
|
||||
*
|
||||
* @deprecated racy
|
||||
* Racy if called after getCurrentKey() to check for a current session;
|
||||
* use getCurrentOrNewKey() in that case.
|
||||
*/
|
||||
public SessionKey createSession(PublicKey target) {
|
||||
SessionKey key = KeyGenerator.getInstance().generateSessionKey();
|
||||
|
@ -243,7 +243,8 @@ public class TransientSessionKeyManager extends SessionKeyManager {
|
||||
* Associate a new session key with the specified target. Metrics to determine
|
||||
* when to expire that key begin with this call.
|
||||
*
|
||||
* @deprecated racy
|
||||
* Racy if called after getCurrentKey() to check for a current session;
|
||||
* use getCurrentOrNewKey() in that case.
|
||||
*/
|
||||
@Override
|
||||
public void createSession(PublicKey target, SessionKey key) {
|
||||
|
Reference in New Issue
Block a user