forked from I2P_Developers/i2p.i2p
I2NP BRR: Minor cleanup and javadoc note
This commit is contained in:
@ -20,7 +20,7 @@ import net.i2p.data.SessionKey;
|
|||||||
* Cleartext:
|
* Cleartext:
|
||||||
* <pre>
|
* <pre>
|
||||||
* bytes 0-3: tunnel ID to receive messages as
|
* bytes 0-3: tunnel ID to receive messages as
|
||||||
* bytes 4-35: local router identity hash
|
* bytes 4-35: local router identity hash (Unused and no accessor here)
|
||||||
* bytes 36-39: next tunnel ID
|
* bytes 36-39: next tunnel ID
|
||||||
* bytes 40-71: next router identity hash
|
* bytes 40-71: next router identity hash
|
||||||
* bytes 72-103: AES-256 tunnel layer key
|
* bytes 72-103: AES-256 tunnel layer key
|
||||||
|
@ -34,7 +34,7 @@ public class BuildResponseRecord {
|
|||||||
//Log log = ctx.logManager().getLog(BuildResponseRecord.class);
|
//Log log = ctx.logManager().getLog(BuildResponseRecord.class);
|
||||||
byte rv[] = new byte[TunnelBuildReplyMessage.RECORD_SIZE];
|
byte rv[] = new byte[TunnelBuildReplyMessage.RECORD_SIZE];
|
||||||
ctx.random().nextBytes(rv, Hash.HASH_LENGTH, TunnelBuildReplyMessage.RECORD_SIZE - Hash.HASH_LENGTH - 1);
|
ctx.random().nextBytes(rv, Hash.HASH_LENGTH, TunnelBuildReplyMessage.RECORD_SIZE - Hash.HASH_LENGTH - 1);
|
||||||
DataHelper.toLong(rv, TunnelBuildMessage.RECORD_SIZE-1, 1, status);
|
rv[TunnelBuildMessage.RECORD_SIZE-1] = (byte) status;
|
||||||
// rv = AES(SHA256(padding+status) + padding + status, replyKey, replyIV)
|
// rv = AES(SHA256(padding+status) + padding + status, replyKey, replyIV)
|
||||||
ctx.sha().calculateHash(rv, Hash.HASH_LENGTH, rv.length - Hash.HASH_LENGTH, rv, 0);
|
ctx.sha().calculateHash(rv, Hash.HASH_LENGTH, rv.length - Hash.HASH_LENGTH, rv, 0);
|
||||||
//if (log.shouldLog(Log.DEBUG))
|
//if (log.shouldLog(Log.DEBUG))
|
||||||
|
Reference in New Issue
Block a user