Class Hasher


  • public final class Hasher
    extends Object
    Internal utility to calculate the hash of java script resources content.
    Pay attention, you must use the chars and NOT the bytes because a byte variable can hold any value from -128 to 127 but a char variable can hold any value between 0 and 255.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • hash

        public static int hash​(StringBuilder value)
        Returns the hash of a StringBuilder argument.
        Parameters:
        value - string builder to use to get the hash
        Returns:
        the hash of a StringBuilder
      • hash

        public static int hash​(String... values)
        Returns the hash of a strings array argument.
        Parameters:
        values - strings array to use to get the hash
        Returns:
        the hash of a strings array
      • hash

        public static int hash​(char... values)
        Returns the hash of a chars array argument.
        Parameters:
        values - chars array to use to get the hash
        Returns:
        the hash of a chars array