Package com.flagsmith.flagengine.utils
Class Hashing
java.lang.Object
com.flagsmith.flagengine.utils.Hashing
public class Hashing extends Object
-
Method Summary
Modifier and Type Method Description FloatgetHashedPercentageForObjectIds(List<String> ids)Returns the percentage of hash of the list of object IDs.FloatgetHashedPercentageForObjectIds(List<String> ids, Integer iterations)Returns the percentage of hash of the list of object IDs with iteration.static HashinggetInstance()Returns the hashing instance.StringgetMD5(String hash)returns the mdt of the string provided.static voidsetInstance(Hashing instanceObj)Set the instance object.
-
Method Details
-
getInstance
Returns the hashing instance. -
setInstance
Set the instance object.- Parameters:
instanceObj- Instance obj of Hashing
-
getHashedPercentageForObjectIds
Returns the percentage of hash of the list of object IDs.- Parameters:
ids- List of string IDs
-
getHashedPercentageForObjectIds
Returns the percentage of hash of the list of object IDs with iteration.- Parameters:
ids- List of string IDs.iterations- Number of iterations for the string to be repeated.
-
getMD5
returns the mdt of the string provided.- Parameters:
hash- String to be hashed.
-