Package org.bitcoinj.crypto.internal
Class TorUtils
- java.lang.Object
-
- org.bitcoinj.crypto.internal.TorUtils
-
public class TorUtils extends java.lang.Object
Utilities for encoding and decoding Onion addresses.
-
-
Constructor Summary
Constructors Constructor Description TorUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
decodeOnionUrl(java.lang.String onionUrl)
Decode an Onion URL into a Tor V2 or V3 address.static java.lang.String
encodeOnionUrlV2(byte[] onionAddrBytes)
Encode an Onion URL from a Tor V2 address.static java.lang.String
encodeOnionUrlV3(byte[] onionAddrBytes)
Encode an Onion URL from a Tor V3 address (pubkey).
-
-
-
Method Detail
-
encodeOnionUrlV2
public static java.lang.String encodeOnionUrlV2(byte[] onionAddrBytes)
Encode an Onion URL from a Tor V2 address.See address-spec.txt
- Parameters:
onionAddrBytes
- Tor V2 address to encode- Returns:
- encoded Onion URL
-
encodeOnionUrlV3
public static java.lang.String encodeOnionUrlV3(byte[] onionAddrBytes)
Encode an Onion URL from a Tor V3 address (pubkey).See address-spec.txt
- Parameters:
onionAddrBytes
- Tor V3 address to encode- Returns:
- encoded Onion URL
-
decodeOnionUrl
public static byte[] decodeOnionUrl(java.lang.String onionUrl)
Decode an Onion URL into a Tor V2 or V3 address.See address-spec.txt
- Parameters:
onionUrl
- Onion URL to decode- Returns:
- decoded Tor address
-
-