java.lang.Object
net.i2p.util.ConvertToHash
Convert any kind of destination String to a hash Supported: Base64 dest Base64 dest.i2p Base64 Hash Base64 Hash.i2p Base32 Hash Base32 desthash.b32.i2p example.i2p.
Constructor Summary
ConstructorsMethod Summary
All Methods
Constructor Details
ConvertToHash
public ConvertToHash()Constructor. The class holds no state - every conversion is a static call - so an instance is meaningful only as a placeholder for those calls.
Method Details
getHash
Convert any kind of destination String to a hash.- Parameters:
peer- the destination string in any supported form - base64 hash, base64 or base32 hash with an .i2p suffix, base64 destination with or without .i2p, or a hostname resolved via the naming service; any http:// or https:// prefix and a trailing slash are stripped first- Returns:
- null on failure
main
Print the base64 hash of each argument, or "conversion failed".- Parameters:
args- the destination strings to convert, each printed to stdout as base64 or as "conversion failed"