forked from I2P_Developers/i2p.i2p
NTCP: Log tweaks to help on ticket #996
This commit is contained in:
@ -81,8 +81,14 @@ public class CryptixAESEngine extends AESEngine {
|
||||
*/
|
||||
@Override
|
||||
public void encrypt(byte payload[], int payloadIndex, byte out[], int outIndex, SessionKey sessionKey, byte iv[], int ivOffset, int length) {
|
||||
if ( (payload == null) || (out == null) || (sessionKey == null) || (iv == null) )
|
||||
throw new NullPointerException("invalid args to aes");
|
||||
if (payload == null)
|
||||
throw new NullPointerException("invalid args to aes - payload");
|
||||
if (out == null)
|
||||
throw new NullPointerException("invalid args to aes - out");
|
||||
if (sessionKey == null)
|
||||
throw new NullPointerException("invalid args to aes - sessionKey");
|
||||
if (iv == null)
|
||||
throw new NullPointerException("invalid args to aes - iv");
|
||||
if (payload.length < payloadIndex + length)
|
||||
throw new IllegalArgumentException("Payload is too short");
|
||||
if (out.length < outIndex + length)
|
||||
|
@ -128,7 +128,7 @@ class Writer {
|
||||
_prepBuffer.init();
|
||||
con.prepareNextWrite(_prepBuffer);
|
||||
} catch (RuntimeException re) {
|
||||
_log.log(Log.CRIT, "Error in the ntcp writer", re);
|
||||
_log.log(Log.CRIT, "Error in the ntcp writer on " + con, re);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user