Class HashFunctions
- java.lang.Object
-
- org.apache.pinot.common.function.scalar.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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringmd5(byte[] input)Return MD5 digest as hex string.static Stringsha(byte[] input)Return SHA-1 digest as hex string.static Stringsha256(byte[] input)Return SHA-256 digest as hex string.static Stringsha512(byte[] input)Return SHA-512 digest as hex string.
-
-
-
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
-
-