|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logi.crypto.Crypto
org.logi.crypto.hash.HashState
org.logi.crypto.hash.SHA1State
An object of this class holds the state of a SHA-1 fingerprint still being calculated.
This class actually uses java.security.MessageDigest to do all the work.
Field Summary |
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
SHA1State()
Create a new clear SHA1State. |
Method Summary | |
int |
blockSize()
Return the size of input-blocks for this hash function in bytes. |
Fingerprint |
calculate()
Return a Fingerprint for the curret state, without destroying the state. |
java.lang.String |
getName()
The name of the algorithm is "SHA1". |
int |
hashSize()
Returns the size of a fingerprint in bytes. |
void |
reset()
Reset the internal state of the object. |
void |
update(byte[] buffer,
int offset,
int length)
Update the hash state with the bytes from buf[offset, offset+length-1] . |
Methods inherited from class org.logi.crypto.hash.HashState |
create, create, getDefaultHashFunction, setDefaultHashFunction, update, update |
Methods inherited from class org.logi.crypto.Crypto |
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readBlock, readInt, writeBytes, writeBytes, writeInt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SHA1State()
Method Detail |
public java.lang.String getName()
getName
in class HashState
public void reset()
reset
in class HashState
public void update(byte[] buffer, int offset, int length)
buf[offset, offset+length-1]
.
update
in class HashState
public Fingerprint calculate()
calculate
in class HashState
public int blockSize()
blockSize
in class HashState
public int hashSize()
hashSize
in class HashState
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |