@@ -106,7 +106,7 @@ public static String GetMachineCode(int v) {
106106 public static boolean IsOnRightMachine (LicenseKey license ) {
107107 return IsOnRightMachine (license , false );
108108 }
109-
109+
110110 /**
111111 * Check if the device is registered with the license key.
112112 * @param license The license key object.
@@ -118,6 +118,32 @@ public static boolean IsOnRightMachine(LicenseKey license, boolean isFloatingLic
118118 return IsOnRightMachine (license , isFloatingLicense , false );
119119 }
120120
121+ /**
122+ * Check if the device is registered with the license key.
123+ * @param license The license key object.
124+ * @param v If set to 2, this method will use the UUID of the device instead of depending
125+ * on slf4j. Note, it currently only supports Windows. You can read more
126+ * here: https://help.cryptolens.io/faq/index#java.
127+ * @return True if the license is registered with this machine and False otherwise.
128+ */
129+ public static boolean IsOnRightMachine (LicenseKey license , int v ) {
130+ return IsOnRightMachine (license , v , false );
131+ }
132+
133+ /**
134+ * Check if the device is registered with the license key.
135+ * @param license The license key object.
136+ * @param isFloatingLicense If this is a floating license, this parameter has to be set to true.
137+ * You can enable floating licenses by setting @see ActivateModel.FloatingTimeInterval.
138+ * @param v If set to 2, this method will use the UUID of the device instead of depending
139+ * on slf4j. Note, it currently only supports Windows. You can read more
140+ * here: https://help.cryptolens.io/faq/index#java.
141+ * @return True if the license is registered with this machine and False otherwise.
142+ */
143+ public static boolean IsOnRightMachine (LicenseKey license , int v , boolean isFloatingLicense ) {
144+ return IsOnRightMachine (license , v , isFloatingLicense , false );
145+ }
146+
121147 /**
122148 * Check if the device is registered with the license key.
123149 * @param license The license key object
@@ -134,6 +160,26 @@ public static boolean IsOnRightMachine(LicenseKey license, boolean isFloatingLic
134160 return IsOnRightMachine (license , current_mid , isFloatingLicense , allowOverdraft );
135161 }
136162
163+ /**
164+ * Check if the device is registered with the license key.
165+ * @param license The license key object.
166+ * @param v If set to 2, this method will use the UUID of the device instead of depending
167+ * on slf4j. Note, it currently only supports Windows. You can read more
168+ * here: https://help.cryptolens.io/faq/index#java.
169+ * @param isFloatingLicense If this is a floating license, this parameter has to be set to true.
170+ * You can enable floating licenses by setting @see ActivateModel.FloatingTimeInterval.
171+ * @param allowOverdraft If floating licensing is enabled with overdraft, this parameter should be set to true.
172+ * You can enable overdraft by setting ActivateModel.MaxOverdraft" to a value greater than 0.
173+ * @return True if the license is registered with this machine and False otherwise.
174+ */
175+ public static boolean IsOnRightMachine (LicenseKey license , int v , boolean isFloatingLicense , boolean allowOverdraft ) {
176+
177+ String current_mid = Helpers .GetMachineCode (v );
178+
179+ return IsOnRightMachine (license , current_mid , isFloatingLicense , allowOverdraft );
180+ }
181+
182+
137183
138184 /**
139185 * Check if the device is registered with the license key. This method is useful for platforms where the
0 commit comments