forked from I2P_Developers/i2p.i2p
add converttohash to commandline
This commit is contained in:
@@ -30,6 +30,7 @@ public class CommandLine {
|
||||
"net.i2p.data.Base64",
|
||||
"net.i2p.data.PrivateKeyFile",
|
||||
"net.i2p.util.Addresses",
|
||||
"net.i2p.util.ConvertToHash",
|
||||
"net.i2p.util.EepGet",
|
||||
"net.i2p.util.EepHead",
|
||||
"net.i2p.util.FileUtil",
|
||||
|
@@ -82,4 +82,18 @@ public class ConvertToHash {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.28
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
if (args.length == 0) {
|
||||
System.err.println("Usage: converttohash [hostname|b32|destination]...");
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
Hash h = getHash(args[i]);
|
||||
System.out.println(h != null ? h.toBase64() : "conversion failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user