Package javax0.license3j.hardware
Class UUIDCalculator
- java.lang.Object
-
- javax0.license3j.hardware.UUIDCalculator
-
public class UUIDCalculator extends java.lang.Object
Calculate a UUID that is specific to the machne. Note that machines are hard to identify and therefore there is no guarantee that two machines will not ever have the same UUID and also there is no guarantee that a single machine will always have the same UUID. The first one is less of a problem. The later, the stability of the UUID of a single machine can be managed with the parameters of the calculator, controlling what the calculation takes into account. The less parameters you select the more stable the UUID will be. On the other hand the less parameter you use the more machines may end-up having the same UUID. Machne UUIDs may be used to restrict the usage of a software to certain machines.
-
-
Constructor Summary
Constructors Constructor Description UUIDCalculator(Network.Interface.Selector selector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
assertUUID(java.lang.String uuid, boolean useNetwork, boolean useHostName, boolean useArchitecture)
boolean
assertUUID(java.util.UUID uuid, boolean useNetwork, boolean useHostName, boolean useArchitecture)
java.util.UUID
getMachineId(boolean useNetwork, boolean useHostName, boolean useArchitecture)
java.lang.String
getMachineIdString(boolean useNetwork, boolean useHostName, boolean useArchitecture)
-
-
-
Constructor Detail
-
UUIDCalculator
public UUIDCalculator(Network.Interface.Selector selector)
-
-
Method Detail
-
getMachineId
public java.util.UUID getMachineId(boolean useNetwork, boolean useHostName, boolean useArchitecture) throws java.net.SocketException, java.net.UnknownHostException, java.security.NoSuchAlgorithmException
- Throws:
java.net.SocketException
java.net.UnknownHostException
java.security.NoSuchAlgorithmException
-
getMachineIdString
public java.lang.String getMachineIdString(boolean useNetwork, boolean useHostName, boolean useArchitecture) throws java.net.SocketException, java.net.UnknownHostException, java.security.NoSuchAlgorithmException
- Throws:
java.net.SocketException
java.net.UnknownHostException
java.security.NoSuchAlgorithmException
-
assertUUID
public boolean assertUUID(java.util.UUID uuid, boolean useNetwork, boolean useHostName, boolean useArchitecture) throws java.net.SocketException, java.net.UnknownHostException, java.security.NoSuchAlgorithmException
- Throws:
java.net.SocketException
java.net.UnknownHostException
java.security.NoSuchAlgorithmException
-
assertUUID
public boolean assertUUID(java.lang.String uuid, boolean useNetwork, boolean useHostName, boolean useArchitecture)
-
-