Changeset ffb3a758 for core


Ignore:
Timestamp:
Nov 25, 2016 2:06:23 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f6778c5
Parents:
e3435dc
Message:

add converttohash to commandline

Location:
core/java/src/net/i2p/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/CommandLine.java

    re3435dc rffb3a758  
    3131        "net.i2p.data.PrivateKeyFile",
    3232        "net.i2p.util.Addresses",
     33        "net.i2p.util.ConvertToHash",
    3334        "net.i2p.util.EepGet",
    3435        "net.i2p.util.EepHead",
  • core/java/src/net/i2p/util/ConvertToHash.java

    re3435dc rffb3a758  
    8383        return null;
    8484    }
     85
     86    /**
     87     * @since 0.9.28
     88     */
     89    public static void main(String args[]) {
     90        if (args.length == 0) {
     91            System.err.println("Usage: converttohash [hostname|b32|destination]...");
     92            return;
     93        }
     94        for (int i = 0; i < args.length; i++) {
     95            Hash h = getHash(args[i]);
     96            System.out.println(h != null ? h.toBase64() : "conversion failed");
     97        }
     98    }
    8599}
Note: See TracChangeset for help on using the changeset viewer.