API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.security. MessageDigest View Source
Author(s)
Benjamin Renaud
Since
Version
1.81, 04/21/06
Serial
Hierarchy
 Object
      MessageDigestSpi
          MessageDigest
Implements
Subclasses
Description
publicabstract abstract class MessageDigest
  This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.
Constructors
protected MessageDigest (String algorithm)
  Creates a message digest with the specified algorithm name.
Methods
Hide/Show inherited methods
public Object clone () throws CloneNotSupportedException [Overrides MessageDigestSpi]
  Returns a clone if the implementation is cloneable.
public byte digest ()
  Completes the hash computation by performing final operations such as padding.
public byte digest (byte[] input)
  Performs a final update on the digest using the specified array of bytes, then completes the digest computation.
public int digest (byte[] buf, int offset, int len) throws DigestException
  Completes the hash computation by performing final operations such as padding.
protectedabstract byte engineDigest () [Inherited From MessageDigestSpi]
  Completes the hash computation by performing final operations such as padding.
protected int engineDigest (byte[] buf, int offset, int len) throws DigestException [Inherited From MessageDigestSpi]
  Completes the hash computation by performing final operations such as padding.
protected int engineGetDigestLength () [Inherited From MessageDigestSpi]
  Returns the digest length in bytes.
protectedabstract void engineReset () [Inherited From MessageDigestSpi]
Resets the digest for further use.
protectedabstract void engineUpdate (byte input) [Inherited From MessageDigestSpi]
  Updates the digest using the specified byte.
protectedabstract void engineUpdate (byte[] input, int offset, int len) [Inherited From MessageDigestSpi]
  Updates the digest using the specified array of bytes, starting at the specified offset.
protected void engineUpdate (ByteBuffer input) [Inherited From MessageDigestSpi]
  Update the digest using the specified ByteBuffer.
publicfinal String getAlgorithm ()
  Returns a string that identifies the algorithm, independent of implementation details.
publicfinal int getDigestLength ()
  Returns the length of the digest in bytes, or 0 if this operation is not supported by the provider and the implementation is not cloneable.
publicstatic MessageDigest getInstance (String algorithm) throws NoSuchAlgorithmException
  Returns a MessageDigest object that implements the specified digest algorithm.
publicstatic MessageDigest getInstance (String algorithm, Provider provider) throws NoSuchAlgorithmException
  Returns a MessageDigest object that implements the specified digest algorithm.
publicstatic MessageDigest getInstance (String algorithm, String provider) throws NoSuchAlgorithmException NoSuchProviderException
  Returns a MessageDigest object that implements the specified digest algorithm.
publicfinal Provider getProvider ()
  Returns the provider of this message digest object.
publicstatic boolean isEqual (byte[] digesta, byte[] digestb)
  Compares two digests for equality.
public void reset ()
Resets the digest for further use.
public String toString ()
Returns a string representation of this message digest object.
public void update (byte input)
  Updates the digest using the specified byte.
public void update (byte[] input)
  Updates the digest using the specified array of bytes.
public void update (byte[] input, int offset, int len)
  Updates the digest using the specified array of bytes, starting at the specified offset.
publicfinal void update (ByteBuffer input)
  Update the digest using the specified ByteBuffer.
Fields
Hide/Show inherited fields
Nested Classes
  MessageDigest.Delegate
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar