org.apache.catalina.util

Class MD5Encoder


public final class MD5Encoder
extends java.lang.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:
$Revision: 1.2 $ $Date: 2004/02/27 14:58:50 $

Author:
Remy Maucherat

Method Summary

String
encode(byte[] binaryData)
Encodes the 128 bit (16 bytes) MD5 into a 32 character String.

Method Details

encode

public 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


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.