Class Utils
java.lang.Object
org.tasktide.core.supporting.Utils
Class to support various actions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertStringToHex(String input) Convert input string to hexidecimaldecodeBase64Token(String token) Decode base64 encode tokenGenerate base64 encode tokenstatic StringGenerate a salt from a random UUID stringgenerateSHA_Hash(String input, String salt) Generate fingerprint from salted inputGenerate hexidecimal string from salted current timeGet char setGet the date utilitygetHexString(byte[] digest) Hexideciaml string from input byte arraygetRand()Fetch this random instanceintgetRandInt(int limit) Generate random number from 0 to limitstatic StringFetch random UUIDstatic UUIDFetch UUID from input stringbooleanwaitMilliSeconds(int amount) Wait random amount of milliseconds up to limitbooleanwaitSeconds(int amount) Wait random amount of seconds up to limit
-
Constructor Details
-
Utils
Construct with a task generator and random- Parameters:
dateFormat-expiration-
-
-
Method Details
-
generateSalt
-
getUUID
-
getRandomUUID
-
convertStringToHex
-
generateToken
-
generateBase64Token
-
decodeBase64Token
-
getHexString
Hexideciaml string from input byte array- Parameters:
digest-- Returns:
- String
-
generateSHA_Hash
-
getRandInt
public int getRandInt(int limit) Generate random number from 0 to limit- Parameters:
limit-- Returns:
- int
-
waitSeconds
public boolean waitSeconds(int amount) Wait random amount of seconds up to limit- Parameters:
amount-- Returns:
- boolean
-
waitMilliSeconds
public boolean waitMilliSeconds(int amount) Wait random amount of milliseconds up to limit- Parameters:
amount-- Returns:
- boolean
-
getRand
-
getCharSet
-
getDateUtility
-