public abstract class MessageDigest extends MessageDigestSpi
Modifier | Constructor and Description |
---|---|
protected |
MessageDigest(String algorithm) |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Default clone() method performs a "shallow" cloning of the instance.
|
byte[] |
digest() |
byte[] |
digest(byte[] bytes) |
int |
digest(byte[] buf,
int offset,
int len) |
String |
getAlgorithm() |
int |
getDigestLength() |
static MessageDigest |
getInstance(String algorithm) |
static MessageDigest |
getInstance(String algorithm,
Provider provider) |
static MessageDigest |
getInstance(String algorithm,
String provider) |
Provider |
getProvider() |
static boolean |
isEqual(byte[] first,
byte[] second) |
void |
reset() |
String |
toString()
Default String representation: overriden by many classes.
|
void |
update(byte b) |
void |
update(byte[] bytes) |
void |
update(byte[] bytes,
int offset,
int len) |
engineDigest, engineDigest, engineGetDigestLength, engineReset, engineUpdate, engineUpdate
protected MessageDigest(String algorithm)
public static boolean isEqual(byte[] first, byte[] second)
public static MessageDigest getInstance(String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static MessageDigest getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
public static MessageDigest getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public final Provider getProvider()
public void update(byte b)
public void update(byte[] bytes, int offset, int len)
public void update(byte[] bytes)
public byte[] digest()
public int digest(byte[] buf, int offset, int len) throws DigestException
DigestException
public byte[] digest(byte[] bytes)
public String toString()
Object
public void reset()
public final String getAlgorithm()
public final int getDigestLength()
public Object clone() throws CloneNotSupportedException
Object
clone
in class MessageDigestSpi
CloneNotSupportedException