|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.blowfishj.SHA1
SHA-1 message digest implementation, translated from C source code (the origin is unknown).
Field Summary | |
static int |
DIGEST_SIZE
size of a SHA-1 digest in octets |
Constructor Summary | |
SHA1()
Default constructor. |
Method Summary | |
void |
clear()
Clears all data, use reset() to start again. |
void |
finalize()
Finalizes the digest. |
byte[] |
getDigest()
Retrieves the digest. |
int |
getDigest(byte[] buf,
int nOfs)
Retrieves the digest into an existing buffer. |
void |
reset()
Initializes (or resets) the hasher for a new session. |
boolean |
selfTest()
Runs an integrity test. |
java.lang.String |
toString()
makes a binhex string representation of the current digest |
void |
update(byte bB)
Adds a single byte to the digest. |
void |
update(byte[] data)
Deprecated. use update(byte[], int, int) instead |
void |
update(byte[] data,
int nOfs,
int nLen)
Adds a portion of a byte array to the digest. |
void |
update(java.lang.String sData)
Deprecated. don't use this method anymore (it's not clean), you might want to try update(sData.getBytes()) instead |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DIGEST_SIZE
Constructor Detail |
public SHA1()
Method Detail |
public void clear()
public void reset()
public void update(byte bB)
bB
- the byte to addpublic void update(byte[] data)
data
- the data to addpublic void update(byte[] data, int nOfs, int nLen)
data
- the data to addpublic void update(java.lang.String sData)
sData
- the string to addpublic void finalize()
public byte[] getDigest()
public int getDigest(byte[] buf, int nOfs)
buf
- buffer to store the digst intonOfs
- where to write to
public java.lang.String toString()
public boolean selfTest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |