de.bb.minissl
Class SHA
java.lang.Object
|
+--de.bb.minissl.MessageDigest
|
+--de.bb.minissl.SHA
- public final class SHA
- extends MessageDigest
This is a simple port of Steve Reid's SHA-1 code into Java.
I've run his test vectors through the code and they all pass.
|
Constructor Summary |
SHA()
constructor |
|
Method Summary |
java.lang.Object |
clone()
clone implementation |
protected byte[] |
engineDigest()
Complete processing on the message digest. |
protected void |
engineReset()
Initialize new context |
protected void |
engineUpdate(byte b)
add one byte to the digest. when this is implemented
all of the abstract class methods end up calling
this method for types other than bytes. |
| Methods inherited from class de.bb.minissl.MessageDigest |
digest, digest, engineUpdate, getAlgorithm, getInstance, getInstance, hmac, isEqual, reset, rol, update, update, update |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHA
public SHA()
- constructor
clone
public java.lang.Object clone()
- clone implementation
- Overrides:
clone in class MessageDigest
- Returns:
- a copy of the current object
engineReset
protected final void engineReset()
- Initialize new context
- Overrides:
engineReset in class MessageDigest
engineUpdate
protected final void engineUpdate(byte b)
- add one byte to the digest. when this is implemented
all of the abstract class methods end up calling
this method for types other than bytes.
- Overrides:
engineUpdate in class MessageDigest
- Parameters:
b - the byte which is added
engineDigest
protected final byte[] engineDigest()
- Complete processing on the message digest.
- Overrides:
engineDigest in class MessageDigest
- Following copied from class:
de.bb.minissl.MessageDigest
- Returns:
- the array of bytes for the resulting hash value.