Class AddressUtil
java.lang.Object
com.xpdustry.claj.common.util.AddressUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringencodeId(int conId) static StringencodeId(arc.net.Connection con) static InetAddressgenerate(long addressHash) Generates an IPv6 address using the hash.static InetAddressget(arc.net.Connection con) static StringgetString(arc.net.Connection con) static longhash(arc.net.Connection connection) static longhash(InetAddress address) Hashes the address using FNV-1a 64-bit.static InetAddressobfuscate(InetAddress address) Hashes the address then converts it back to an address.
-
Constructor Details
-
AddressUtil
public AddressUtil()
-
-
Method Details
-
hash
public static long hash(arc.net.Connection connection) -
hash
Hashes the address using FNV-1a 64-bit. -
generate
Generates an IPv6 address using the hash. -
obfuscate
Hashes the address then converts it back to an address. -
get
-
getString
-
encodeId
-
encodeId
-