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

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

add converttohash to commandline

parent e3435dce
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ public class CommandLine { ...@@ -30,6 +30,7 @@ public class CommandLine {
"net.i2p.data.Base64", "net.i2p.data.Base64",
"net.i2p.data.PrivateKeyFile", "net.i2p.data.PrivateKeyFile",
"net.i2p.util.Addresses", "net.i2p.util.Addresses",
"net.i2p.util.ConvertToHash",
"net.i2p.util.EepGet", "net.i2p.util.EepGet",
"net.i2p.util.EepHead", "net.i2p.util.EepHead",
"net.i2p.util.FileUtil", "net.i2p.util.FileUtil",
......
...@@ -82,4 +82,18 @@ public class ConvertToHash { ...@@ -82,4 +82,18 @@ public class ConvertToHash {
return null; 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");
}
}
} }
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