All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.tools.crypt.Md5

java.lang.Object
   |
   +----w3c.tools.crypt.Md5

public class Md5
extends Object

Constructor Index

 o Md5(InputStream)
Construct a digestifier for the given input stream.
 o Md5(String)
Construct a digestifier for the given string.

Method Index

 o getDigest()
Get the digest for our input stream.
 o getStringDigest()
Get the digest, as a proper string.
 o main(String[])
 o processString()
Get the digest, for this string digestifier.

Constructors

 o Md5
 public Md5(String input)
Construct a digestifier for the given string.

Parameters:
input - The string to be digestified.
 o Md5
 public Md5(InputStream in)
Construct a digestifier for the given input stream.

Parameters:
in - The input stream to be digestified.

Methods

 o getDigest
 public byte[] getDigest() throws IOException
Get the digest for our input stream. This method constructs the input stream digest, and return it, as a a String, following the MD5 (rfc1321) algorithm,

Returns:
An instance of String, giving the message digest.
Throws: IOException
Thrown if the digestifier was unable to read the input stream.
 o processString
 public byte[] processString()
Get the digest, for this string digestifier. This method doesn't throw any IOException, since it knows that the underlying stream ws built from a String.

 o getStringDigest
 public String getStringDigest()
Get the digest, as a proper string.

 o main
 public static void main(String args[]) throws IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index