I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 72e4b16c authored by zzz's avatar zzz
Browse files

I2NP BRR: Minor cleanup and javadoc note

parent 8a10c3a0
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ import net.i2p.data.SessionKey;
* Cleartext:
* <pre>
* 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 40-71: next router identity hash
* bytes 72-103: AES-256 tunnel layer key
......
......@@ -34,7 +34,7 @@ public class BuildResponseRecord {
//Log log = ctx.logManager().getLog(BuildResponseRecord.class);
byte rv[] = new byte[TunnelBuildReplyMessage.RECORD_SIZE];
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)
ctx.sha().calculateHash(rv, Hash.HASH_LENGTH, rv.length - Hash.HASH_LENGTH, rv, 0);
//if (log.shouldLog(Log.DEBUG))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment