Class HashFunctions


  • public class HashFunctions
    extends Object
    Inbuilt Hash Transformation Functions The functions can be used as UDFs in Query when added in the FunctionRegistry.
    • Method Detail

      • sha

        public static String sha​(byte[] input)
        Return SHA-1 digest as hex string.
        Parameters:
        input - the byte array representing the data
        Returns:
        hash string in hex format
      • sha256

        public static String sha256​(byte[] input)
        Return SHA-256 digest as hex string.
        Parameters:
        input - the byte array representing the data
        Returns:
        hash string in hex format
      • sha512

        public static String sha512​(byte[] input)
        Return SHA-512 digest as hex string.
        Parameters:
        input - the byte array representing the data
        Returns:
        hash string in hex format
      • md5

        public static String md5​(byte[] input)
        Return MD5 digest as hex string.
        Parameters:
        input - the byte array representing the data
        Returns:
        hash string in hex format