Apache Tomcat 7.0.37

org.apache.catalina.util
Class MD5Encoder

java.lang.Object
  extended by org.apache.catalina.util.MD5Encoder

public final class MD5Encoder
extends Object

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.

Version:
$Id: MD5Encoder.java 1364451 2012-07-22 22:23:22Z markt $
Author:
Remy Maucherat

Constructor Summary
MD5Encoder()
          Deprecated. Will be made private in Tomcat 8.0.x
 
Method Summary
static String encode(byte[] binaryData)
          Encodes the 128 bit (16 bytes) MD5 into a 32 character String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5Encoder

@Deprecated
public MD5Encoder()
Deprecated. Will be made private in Tomcat 8.0.x

Method Detail

encode

public static String encode(byte[] binaryData)
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

Apache Tomcat 7.0.37

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.