MD5Encoder (Apache Tomcat 9.0.111 API Documentation)
Description: declaration: package: org.apache.tomcat.util.security, class: MD5Encoder

# Class MD5Encoder

java.lang.Object
org.apache.tomcat.util.security.MD5Encoder

@Deprecated public final class MD5Encoder extends Object
Deprecated.
Unused. Use `HexUtils` instead. Will be removed in Tomcat 11.
Encode an MD5 digest into a String.

The 128 bit MD5 hash is converted into a 32 character long String. Each character of the String is the hexadecimal representation of 4 bits of the digest.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `encode(byte[] binaryData)`
  Deprecated.
  Encodes the 128 bit (16 bytes) MD5 into a 32 character String.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### encode

    public static String encode(byte[] binaryData)
    Deprecated.
    Encodes the 128 bit (16 bytes) MD5 into a 32 character String.
    Parameters:
      `binaryData` - Array containing the digest
    Returns:
      Encoded MD5, or null if encoding failed