|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.security.MessageDigestSpi
java.security.MessageDigest
public abstract class MessageDigest
| Constructor Summary | |
|---|---|
protected |
MessageDigest(String algorithm)
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver. |
byte[] |
digest()
Computes and returns the final hash value that the receiver represents. |
byte[] |
digest(byte[] input)
|
int |
digest(byte[] buf,
int offset,
int len)
|
String |
getAlgorithm()
Returns the standard Java Security name for the algorithm being used by the receiver. |
int |
getDigestLength()
Return the engine digest length in bytes. |
static MessageDigest |
getInstance(String algorithm)
|
static MessageDigest |
getInstance(String algorithm,
Provider provider)
Returns a new MessageDigest which is capable of running the algorithm described by the argument. |
static MessageDigest |
getInstance(String algorithm,
String provider)
|
Provider |
getProvider()
Returns the Provider of the digest represented by the receiver. |
static boolean |
isEqual(byte[] digesta,
byte[] digestb)
Does a simply byte-per-byte compare of the two digests. |
void |
reset()
Puts the receiver back in an initial state, such that it is ready to compute a new hash. |
String |
toString()
Returns a string containing a concise, human-readable description of the receiver. |
void |
update(byte arg0)
Includes the argument in the hash value computed by the receiver. |
void |
update(byte[] input)
|
void |
update(byte[] input,
int offset,
int len)
|
void |
update(ByteBuffer input)
|
| Methods inherited from class java.security.MessageDigestSpi |
|---|
engineDigest, engineDigest, engineGetDigestLength, engineReset, engineUpdate, engineUpdate, engineUpdate |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected MessageDigest(String algorithm)
| Method Detail |
|---|
public static MessageDigest getInstance(String algorithm)
throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static MessageDigest getInstance(String algorithm,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException
NoSuchAlgorithmException
NoSuchProviderException
public static MessageDigest getInstance(String algorithm,
Provider provider)
throws NoSuchAlgorithmException
algorithm - java.lang.String Name of the algorithm desiredprovider - Provider Provider which has to implement the algorithm
NoSuchAlgorithmException - If the algorithm cannot be foundpublic void reset()
public void update(byte arg0)
arg0 - byte
the byte to feed to the hash algorithmreset()
public void update(byte[] input,
int offset,
int len)
public void update(byte[] input)
public byte[] digest()
reset()
public int digest(byte[] buf,
int offset,
int len)
throws DigestException
DigestExceptionpublic byte[] digest(byte[] input)
public String toString()
toString in class Object
public static boolean isEqual(byte[] digesta,
byte[] digestb)
digesta - One of the digests to comparedigestb - The digest to compare to
true if the two hashes are equal
false if the two hashes are not equalpublic final String getAlgorithm()
public final Provider getProvider()
public final int getDigestLength()
public Object clone()
throws CloneNotSupportedException
ObjectClasses which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.
clone in class MessageDigestSpiCloneNotSupportedException - if the receiver's class does not
implement the interface Cloneable.public final void update(ByteBuffer input)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||