forked from I2P_Developers/i2p.i2p
pmd pointed out a few unnecessary things (well, a lot more than just this, but these are the ones i'm fixin ;)
This commit is contained in:
@ -40,7 +40,6 @@ import net.i2p.util.RandomSource;
|
||||
*/
|
||||
class I2CPMessageProducer {
|
||||
private final static Log _log = new Log(I2CPMessageProducer.class);
|
||||
private final static RandomSource _rand = RandomSource.getInstance();
|
||||
private I2PAppContext _context;
|
||||
|
||||
public I2CPMessageProducer(I2PAppContext context) {
|
||||
@ -116,16 +115,6 @@ class I2CPMessageProducer {
|
||||
return data;
|
||||
}
|
||||
|
||||
private static Set generateNewTags() {
|
||||
Set tags = new HashSet();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
byte tag[] = new byte[SessionTag.BYTE_LENGTH];
|
||||
RandomSource.getInstance().nextBytes(tag);
|
||||
tags.add(new SessionTag(tag));
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an abuse message to the router
|
||||
*/
|
||||
|
@ -248,7 +248,7 @@ public class ElGamalAESEngine {
|
||||
//_log.debug("iv for decryption: " + DataHelper.toString(iv, 16));
|
||||
//_log.debug("decrypting AES block. encr.length = " + (encrypted == null? -1 : encrypted.length) + " sentTag: " + DataHelper.toString(sentTag, 32));
|
||||
byte decrypted[] = _context.AESEngine().decrypt(encrypted, key, iv);
|
||||
Hash h = _context.sha().calculateHash(decrypted);
|
||||
//Hash h = _context.sha().calculateHash(decrypted);
|
||||
//_log.debug("Hash of entire aes block after decryption: \n" + DataHelper.toString(h.getData(), 32));
|
||||
try {
|
||||
SessionKey newKey = null;
|
||||
@ -501,7 +501,7 @@ public class ElGamalAESEngine {
|
||||
aesSrc.write(padding);
|
||||
|
||||
byte aesUnencr[] = aesSrc.toByteArray();
|
||||
Hash h = _context.sha().calculateHash(aesUnencr);
|
||||
//Hash h = _context.sha().calculateHash(aesUnencr);
|
||||
//_log.debug("Hash of entire aes block before encryption: (len=" + aesUnencr.length + ")\n" + DataHelper.toString(h.getData(), 32));
|
||||
byte aesEncr[] = _context.AESEngine().encrypt(aesUnencr, key, iv);
|
||||
//_log.debug("Encrypted length: " + aesEncr.length);
|
||||
|
Reference in New Issue
Block a user