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.
-
ident
-
-
MessageDigest(String)
- Creates a message digest with the specified algorithm name.
-
clone()
- Returns a clone if the implementation is cloneable.
-
digest()
- Completes the hash computation by performing final operations such
as padding.
-
digest(byte[])
- Performs a final update on the digest using the specified array of
bytes, then completes the digest computation.
-
engineDigest()
- SPI: Completes the hash computation by performing final operations
such as padding.
-
engineReset()
- SPI: Resets the digest for further use.
-
engineUpdate(byte)
- SPI: Updates the digest using the specified byte.
-
engineUpdate(byte[], int, int)
- SPI: Updates the digest using the specified array of bytes, starting
at the specified offset.
-
getAlgorithm()
- Returns a string that identifies the algorithm, independent of
implementation details.
-
getInstance(String)
- Generates a MessageDigest object that implements the specified
digest algorithm.
-
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.
-
isEqual(byte[], byte[])
- Compares two digests for equality.
-
reset()
- Resets the digest for further use.
-
update(byte)
- Updates the digest using the specified byte.
-
update(byte[])
- Updates the digest using the specified array of bytes.
-
update(byte[], int, int)
- Updates the digest using the specified array of bytes, starting at
the specified offset.
ident
public final static String ident
MessageDigest
public MessageDigest(String name)
- Creates a message digest with the specified algorithm name.
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.
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).
update
public void update(byte input)
- Updates the digest using the specified byte.
update
public void update(byte input[],
int offset,
int len)
- Updates the digest using the specified array of bytes, starting at
the specified offset.
update
public void update(byte input[])
- Updates the digest using the specified array of bytes.
digest
public byte[] digest()
- Completes the hash computation by performing final operations such
as padding. The digest is reset after this call is made.
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().
isEqual
public static boolean isEqual(byte digesta[],
byte digestb[])
- Compares two digests for equality. Does a simple byte compare.
reset
public void reset()
- Resets the digest for further use.
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.
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
engineUpdate
protected abstract void engineUpdate(byte input)
- SPI: Updates the digest using the specified byte.
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.
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.
engineReset
protected abstract void engineReset()
- SPI: Resets the digest for further use.
All Packages Class Hierarchy This Package Previous Next Index