Class Hashing

java.lang.Object
com.flagsmith.flagengine.utils.Hashing

public class Hashing
extends Object
  • Method Details

    • getInstance

      public static Hashing getInstance()
      Returns the hashing instance.
    • setInstance

      public static void setInstance​(Hashing instanceObj)
      Set the instance object.
      Parameters:
      instanceObj - Instance obj of Hashing
    • getHashedPercentageForObjectIds

      public Float getHashedPercentageForObjectIds​(List<String> ids)
      Returns the percentage of hash of the list of object IDs.
      Parameters:
      ids - List of string IDs
    • getHashedPercentageForObjectIds

      public Float getHashedPercentageForObjectIds​(List<String> ids, Integer iterations)
      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

      public String getMD5​(String hash)
      returns the mdt of the string provided.
      Parameters:
      hash - String to be hashed.