Class MD5Hash

java.lang.Object
org.apache.hadoop.hbase.util.MD5Hash

@Public public class MD5Hash extends Object
Utility class for MD5 MD5 hash produces a 128-bit digest.
  • Constructor Details

  • Method Details

    • getMD5AsHex

      public static String getMD5AsHex(byte[] key)
      Given a byte array, returns in MD5 hash as a hex string.
      Returns:
      SHA1 hash as a 32 character hex string.
    • getMD5AsHex

      public static String getMD5AsHex(byte[] key, int offset, int length)
      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.