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

Skip to content
Snippets Groups Projects
Commit 6093f26f authored by zzz's avatar zzz
Browse files

minor cleanup

parent 4615fce2
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ import java.util.TimeZone; ...@@ -19,6 +19,7 @@ import java.util.TimeZone;
import net.i2p.I2PAppContext; import net.i2p.I2PAppContext;
import net.i2p.crypto.SHA256Generator; import net.i2p.crypto.SHA256Generator;
import net.i2p.data.DataHelper;
import net.i2p.data.Hash; import net.i2p.data.Hash;
import net.i2p.data.RoutingKeyGenerator; import net.i2p.data.RoutingKeyGenerator;
import net.i2p.util.HexDump; import net.i2p.util.HexDump;
...@@ -130,9 +131,7 @@ public class RouterKeyGenerator extends RoutingKeyGenerator { ...@@ -130,9 +131,7 @@ public class RouterKeyGenerator extends RoutingKeyGenerator {
String modVal = _fmt.format(today); String modVal = _fmt.format(today);
if (modVal.length() != LENGTH) if (modVal.length() != LENGTH)
throw new IllegalStateException(); throw new IllegalStateException();
byte[] mod = new byte[LENGTH]; byte[] mod = DataHelper.getASCII(modVal);
for (int i = 0; i < LENGTH; i++)
mod[i] = (byte)(modVal.charAt(i) & 0xFF);
return mod; return mod;
} }
...@@ -199,10 +198,7 @@ public class RouterKeyGenerator extends RoutingKeyGenerator { ...@@ -199,10 +198,7 @@ public class RouterKeyGenerator extends RoutingKeyGenerator {
} }
if (modVal.length() != LENGTH) if (modVal.length() != LENGTH)
throw new IllegalStateException(); throw new IllegalStateException();
byte[] mod = new byte[LENGTH]; byte[] mod = DataHelper.getASCII(modVal);
for (int i = 0; i < LENGTH; i++) {
mod[i] = (byte)(modVal.charAt(i) & 0xFF);
}
return getKey(origKey, mod); return getKey(origKey, mod);
} }
......
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