| java.lang.Object java.security.MessageDigestSpi org.apache.harmony.security.provider.crypto.SHA1_MessageDigestImpl
SHA1_MessageDigestImpl | public class SHA1_MessageDigestImpl extends MessageDigestSpi implements Cloneable,SHA1_Data(Code) | | This class extends the MessageDigestSpi class implementing all its abstract methods;
it overrides the "Object clone()" and "int engineGetDigestLength()" methods.
The class implements the Cloneable interface.
|
Method Summary | |
public Object | clone() Returns a "deep" copy of this SHA1MDImpl object. | protected byte[] | engineDigest() Computes a message digest value. | protected int | engineDigest(byte[] buf, int offset, int len) Computes message digest value.
Upon return, the value is stored in "buf" buffer beginning "offset" byte. | protected int | engineGetDigestLength() Returns a message digest length. | protected void | engineReset() Resets the engine. | protected void | engineUpdate(byte input) Supplements a byte to current message. | protected void | engineUpdate(byte[] input, int offset, int len) Updates current message. |
SHA1_MessageDigestImpl | public SHA1_MessageDigestImpl()(Code) | | The constructor creates needed buffers and sets the engine at initial state
|
engineDigest | protected byte[] engineDigest()(Code) | | Computes a message digest value.
The method resets the engine.
The method overrides "engineDigest()" in class MessageDigestSpi.
byte array containing message digest value |
engineDigest | protected int engineDigest(byte[] buf, int offset, int len) throws DigestException(Code) | | Computes message digest value.
Upon return, the value is stored in "buf" buffer beginning "offset" byte.
The method resets the engine.
The method overrides "engineDigest(byte[],int,int) in class MessageDigestSpi.
Parameters: buf - byte array to store a message digest returned Parameters: offset - a position in the array for first byte of the message digest Parameters: len - number of bytes within buffer allotted for the message digest; as this implementation doesn't provide partial digests, len should be >= 20, DigestException is thrown otherwise the length of the message digest stored in the "buf" buffer; in this implementation the length=20 throws: IllegalArgumentException - if null is passed to the "buf" argument if offset + len > buf.length if offset > buf.length or len > buf.length throws: DigestException - if len < 20 throws: ArrayIndexOutOfBoundsException - if offset < 0 |
engineGetDigestLength | protected int engineGetDigestLength()(Code) | | Returns a message digest length.
The method overrides "engineGetDigestLength()" in class MessageDigestSpi.
total length of current message digest as an int value |
engineReset | protected void engineReset()(Code) | | Resets the engine.
The method overrides "engineReset()" in class MessageDigestSpi.
|
engineUpdate | protected void engineUpdate(byte input)(Code) | | Supplements a byte to current message.
The method overrides "engineUpdate(byte)" in class MessageDigestSpi.
Parameters: input - byte to add to current message |
engineUpdate | protected void engineUpdate(byte[] input, int offset, int len)(Code) | | Updates current message.
The method overrides "engineUpdate(byte[],int,int)" in class MessageDigestSpi.
The method silently returns if "len" <= 0.
Parameters: input - a byte array Parameters: offset - a number of first byte in the "input" array to use for updating Parameters: len - a number of bytes to use throws: NullPointerException - if null is passed to the "buf" argument throws: IllegalArgumentException - if offset > buf.length or len > buf.length or (len + offset) > buf.length throws: ArrayIndexOutOfBoundsException - offset < 0 |
|
|