Class au.net.aba.security.MessageDigest
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.net.aba.security.MessageDigest

java.lang.Object
   |
   +----au.net.aba.security.MessageDigest

public class MessageDigest
extends Object
The base class for a message digest.

Variable Index

 o ident

Constructor Index

 o MessageDigest(String)
Creates a message digest with the specified algorithm name.

Method Index

 o clone()
Returns a clone if the implementation is cloneable.
 o digest()
Completes the hash computation by performing final operations such as padding.
 o digest(byte[])
Performs a final update on the digest using the specified array of bytes, then completes the digest computation.
 o engineDigest()
SPI: Completes the hash computation by performing final operations such as padding.
 o engineReset()
SPI: Resets the digest for further use.
 o engineUpdate(byte)
SPI: Updates the digest using the specified byte.
 o engineUpdate(byte[], int, int)
SPI: Updates the digest using the specified array of bytes, starting at the specified offset.
 o getAlgorithm()
Returns a string that identifies the algorithm, independent of implementation details.
 o getInstance(String)
Generates a MessageDigest object that implements the specified digest algorithm.
 o getInstance(String, String)
Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider.
 o isEqual(byte[], byte[])
Compares two digests for equality.
 o reset()
Resets the digest for further use.
 o update(byte)
Updates the digest using the specified byte.
 o update(byte[])
Updates the digest using the specified array of bytes.
 o update(byte[], int, int)
Updates the digest using the specified array of bytes, starting at the specified offset.

Variables

 o ident
  public final static String ident

Constructors

 o MessageDigest
  public MessageDigest(String name)
Creates a message digest with the specified algorithm name.

Methods

 o getInstance
  public static MessageDigest getInstance(String algorithm) throws NoSuchAlgorithmException
Generates a MessageDigest object that implements the specified digest algorithm. If the default provider package contains a MessageDigest subclass implementing the algorithm, an instance of that subclass is returned. If the algorithm is not available in the default package, other packages are searched.
Parameters:
algorithm - - the name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
s a Message Digest object implementing the specified algorithm.
Throws: NoSuchAlgorithmException
- if the algorithm is not available in the caller's environment.
 o getInstance
  public static MessageDigest getInstance(String algorithm,
                                          String provider) throws NoSuchAlgorithmException, NoSuchProviderException
Generates a MessageDigest object implementing the specified algorithm, as supplied from the specified provider, if such an algorithm is available from the provider. Only the ABA provider ("ABA") is supported.
Parameters:
algorithm - - the name of the algorithm requested. See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
Returns:
s a Message Digest object implementing the specified algorithm.
Throws: NoSuchAlgorithmException
- if the algorithm is not available in the caller's environment.
Throws: NoSuchProviderException
- if the provider is not available in the caller's environment (only ABA is supported).
 o update
  public void update(byte input)
Updates the digest using the specified byte.
 o update
  public void update(byte input[],
                     int offset,
                     int len)
Updates the digest using the specified array of bytes, starting at the specified offset.
 o update
  public void update(byte input[])
Updates the digest using the specified array of bytes.
 o digest
  public byte[] digest()
Completes the hash computation by performing final operations such as padding. The digest is reset after this call is made.
 o digest
  public byte[] digest(byte input[])
Performs a final update on the digest using the specified array of bytes, then completes the digest computation. That is, this method first calls update on the array, then calls digest().
 o isEqual
  public static boolean isEqual(byte digesta[],
                                byte digestb[])
Compares two digests for equality. Does a simple byte compare.
 o reset
  public void reset()
Resets the digest for further use.
 o getAlgorithm
  public final String getAlgorithm()
Returns a string that identifies the algorithm, independent of implementation details. The name should be a standard Java Security name (such as "SHA", "MD5", and so on). See Appendix A in the Java Cryptography Architecture API Specification & Reference for information about standard algorithm names.
 o clone
  public Object clone() throws CloneNotSupportedException
Returns a clone if the implementation is cloneable.
Throws: CloneNotSupportedException
- if this is called on an implementation that does not support Cloneable.
Overrides:
clone in class Object
 o engineUpdate
  protected abstract void engineUpdate(byte input)
SPI: Updates the digest using the specified byte.
 o engineUpdate
  protected abstract void engineUpdate(byte input[],
                                       int off,
                                       int len)
SPI: Updates the digest using the specified array of bytes, starting at the specified offset. This should be a no-op if the digest has been finalised.
 o engineDigest
  protected abstract byte[] engineDigest()
SPI: Completes the hash computation by performing final operations such as padding. Once engineDigest has been called, the engine should be reset (see reset). Resetting is the responsibility of the engine implementor.
 o engineReset
  protected abstract void engineReset()
SPI: Resets the digest for further use.

All Packages  Class Hierarchy  This Package  Previous  Next  Index