Package org.apache.hadoop.hbase.util
Class MD5Hash
java.lang.Object
org.apache.hadoop.hbase.util.MD5Hash
Utility class for MD5 MD5 hash produces a 128-bit digest.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getMD5AsHex
(byte[] key) Given a byte array, returns in MD5 hash as a hex string.static String
getMD5AsHex
(byte[] key, int offset, int length) Given a byte array, returns its MD5 hash as a hex string.
-
Constructor Details
-
MD5Hash
public MD5Hash()
-
-
Method Details
-
getMD5AsHex
Given a byte array, returns in MD5 hash as a hex string.- Returns:
- SHA1 hash as a 32 character hex string.
-
getMD5AsHex
Given a byte array, returns its MD5 hash as a hex string. Only "length" number of bytes starting at "offset" within the byte array are used.- Parameters:
key
- the key to hash (variable length byte array)- Returns:
- MD5 hash as a 32 character hex string.
-