Class LicenseUtil
- java.lang.Object
-
- jetbrains.buildServer.license.util.LicenseUtil
-
public class LicenseUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringRELEASE_DATE_SUBSTITUTION_DETECTED_MSGThis string is placed here because we want it to be obfuscated and encrypted.
-
Constructor Summary
Constructors Constructor Description LicenseUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcalculateCheckSum(String licenseeName, int customerId, byte[] data)static DatedecodeDate(byte[] encoded)static intdecodeGroup(String group)static BigIntegerdecodeGroups(String key)static byte[]encodeDate(Date date)static StringencodeGroup(int value)static StringencodeGroups(BigInteger value)static byte[]randomPadding(int len)static byte[]stripLeadingZeros(byte[] bytes)
-
-
-
Field Detail
-
RELEASE_DATE_SUBSTITUTION_DETECTED_MSG
public static String RELEASE_DATE_SUBSTITUTION_DETECTED_MSG
This string is placed here because we want it to be obfuscated and encrypted. NOTE: It should be not final to disable inlining.
-
-
Method Detail
-
calculateCheckSum
public static int calculateCheckSum(String licenseeName, int customerId, byte[] data)
-
encodeGroups
public static String encodeGroups(BigInteger value)
-
encodeGroup
public static String encodeGroup(int value)
-
decodeGroups
public static BigInteger decodeGroups(String key) throws InvalidLicenseKeyException
- Throws:
InvalidLicenseKeyException
-
decodeGroup
public static int decodeGroup(String group) throws InvalidLicenseKeyException
- Throws:
InvalidLicenseKeyException
-
encodeDate
public static byte[] encodeDate(@NotNull Date date)
-
decodeDate
@NotNull public static Date decodeDate(byte[] encoded)
-
randomPadding
public static byte[] randomPadding(int len)
-
stripLeadingZeros
public static byte[] stripLeadingZeros(byte[] bytes)
-
-