Top Description Fields Constructors Methods
org.apache.tomcat.util.security

public final Class MD5Encoder

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
org.apache.tomcat.util.buf.HexUtils

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.

Author
Remy Maucherat

Field Summary

Modifier and TypeField and Description
private static final char[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

Encoded MD5, or null if encoding failed
encode
(byte[]
Array containing the digest
binaryData
)

Encodes the 128 bit (16 bytes) MD5 into a 32 character String.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hexadecimalback to summary
private static final char[] hexadecimal

Constructor Detail

MD5Encoderback to summary
private MD5Encoder()

Method Detail

encodeback to summary
public static String encode(byte[] binaryData)

Encodes the 128 bit (16 bytes) MD5 into a 32 character String.

Parameters
binaryData:byte[]

Array containing the digest

Returns:String

Encoded MD5, or null if encoding failed