| java.lang.Object org.apache.java.security.MessageDigest
All known Subclasses: org.apache.java.security.MD5,
MessageDigest | abstract public class MessageDigest (Code) | | This interface abstracts a message digest algorithm.
Note: even if standard Java 1.1 APIs already provide a
message digest implementation, this class is used on those Java
runtime environments (like Kaffe) where the package
java.security is highly improbable to be found.
author: Stefano Mazzocchi version: $Id: MessageDigest.java 264148 2005-08-29 14:21:04Z henning $ |
Constructor Summary | |
public | MessageDigest() Creates the algorithm and reset its state. |
Method Summary | |
public void | append(byte[] block) Append another block to the message. | public void | append(byte[] block, int length) Append another block of specified length to the message. | abstract public void | append(byte[] block, int offset, int length) Append another block of specified length to the message
starting at the given offset. | public byte[] | digest(byte[] block) Appends a message block and return its message digest.
Parameters: block - A byte[]. | public byte[] | digest(byte[] block, int length) Appends a message block with specified length and return its
message digest.
Parameters: block - A byte[]. Parameters: length - An int. | abstract public byte[] | digest(byte[] block, int offset, int length) Appends a message block with specified length starting from the
given offset and return its message digest.
Parameters: block - A byte[]. Parameters: offset - An int. Parameters: length - An int. | abstract public void | reset() Resets the state of the class. |
MessageDigest | public MessageDigest()(Code) | | Creates the algorithm and reset its state.
|
append | public void append(byte[] block)(Code) | | Append another block to the message.
Parameters: block - A byte[]. |
append | public void append(byte[] block, int length)(Code) | | Append another block of specified length to the message.
Parameters: block - A byte[]. Parameters: length - An int. |
append | abstract public void append(byte[] block, int offset, int length)(Code) | | Append another block of specified length to the message
starting at the given offset.
Parameters: block - A byte[]. Parameters: offset - An int. Parameters: length - An int. |
digest | public byte[] digest(byte[] block)(Code) | | Appends a message block and return its message digest.
Parameters: block - A byte[]. A byte[]. |
digest | public byte[] digest(byte[] block, int length)(Code) | | Appends a message block with specified length and return its
message digest.
Parameters: block - A byte[]. Parameters: length - An int. A byte[]. |
digest | abstract public byte[] digest(byte[] block, int offset, int length)(Code) | | Appends a message block with specified length starting from the
given offset and return its message digest.
Parameters: block - A byte[]. Parameters: offset - An int. Parameters: length - An int. A byte[]. |
reset | abstract public void reset()(Code) | | Resets the state of the class. Beware: calling this
method erases all data previously inserted.
|
|
|