Package org.bitcoinj.core.internal
Class TorUtils
java.lang.Object
org.bitcoinj.core.internal.TorUtils
Utilities for encoding and decoding Onion addresses.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
decodeOnionUrl
(String onionUrl) Decode an Onion URL into a Tor V2 or V3 address.static String
encodeOnionUrlV2
(byte[] onionAddrBytes) Encode an Onion URL from a Tor V2 address.static String
encodeOnionUrlV3
(byte[] onionAddrBytes) Encode an Onion URL from a Tor V3 address (pubkey).
-
Constructor Details
-
TorUtils
public TorUtils()
-
-
Method Details
-
encodeOnionUrlV2
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
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
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
-