From 02e7a19f65324ed6c364ebd0099d9ae9225e09a0 Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sun, 1 Jun 2008 20:17:48 +0000 Subject: [PATCH] * i2psnark: Change displayed peer idents to match that shown by bytemonsoon --- apps/i2psnark/java/src/org/klomp/snark/PeerID.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/i2psnark/java/src/org/klomp/snark/PeerID.java b/apps/i2psnark/java/src/org/klomp/snark/PeerID.java index 2788e9e5be..cbde1a33a4 100644 --- a/apps/i2psnark/java/src/org/klomp/snark/PeerID.java +++ b/apps/i2psnark/java/src/org/klomp/snark/PeerID.java @@ -167,7 +167,9 @@ public class PeerID implements Comparable } /** - * Returns the String "id@address" where id is the base64 encoded id. + * Returns the String "id@address" where id is the base64 encoded id + * and address is the base64 dest (was the base64 hash of the dest) which + * should match what the bytemonsoon tracker reports on its web pages. */ public String toString() { @@ -178,7 +180,7 @@ public class PeerID implements Comparable break; } } - return Base64.encode(id, nonZero, id.length-nonZero).substring(0,4) + "@" + address.calculateHash().toBase64().substring(0,6); + return Base64.encode(id, nonZero, id.length-nonZero).substring(0,4) + "@" + address.toBase64().substring(0,6); } /** -- GitLab