java.security
Class MessageDigestSpi
java.lang.Object
java.security.MessageDigestSpi
- Direct Known Subclasses:
- MessageDigest
public abstract class MessageDigestSpi
- extends Object
This class is a Service Provider Interface (therefore the Spi suffix) for
digest algorithms to be supplied by providers. Examples of digest algorithms
are MD5 and SHA.
A digest is a secure hash function for a stream of bytes, like a fingerprint
for the stream of bytes.
MessageDigestSpi
public MessageDigestSpi()
engineGetDigestLength
protected int engineGetDigestLength()
engineUpdate
protected abstract void engineUpdate(byte input)
engineUpdate
protected abstract void engineUpdate(byte[] input,
int offset,
int len)
engineUpdate
protected void engineUpdate(ByteBuffer input)
engineDigest
protected abstract byte[] engineDigest()
engineDigest
protected int engineDigest(byte[] buf,
int offset,
int len)
throws DigestException
- Throws:
DigestException
engineReset
protected abstract void engineReset()
clone
public Object clone()
throws CloneNotSupportedException
- Description copied from class:
Object
- 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.
Classes which wish to support cloning must specify that they implement
the Cloneable interface, since the implementation checks for this.
- Overrides:
clone in class Object
- Returns:
- Object a shallow copy of this object.
- Throws:
CloneNotSupportedException - if the receiver's class does not
implement the interface Cloneable.
Please submit a feedback, bug or feature