|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--is.logi.crypto.Crypto | +--is.logi.crypto.hash.HashState
An object of this class holds the status of a fingerprint still being calculated.
A fingerprint state object can be repeatedly updated with data. At any time a Fingerprint object can be requested for the data that has then been added to the fingerprint state.
SHA1State
,
Fingerprint
,
Signature
Fields inherited from class is.logi.crypto.Crypto |
BIT,
cdsPath,
keySource,
NIBBLE,
primeCertainty,
random |
Constructor Summary | |
HashState()
|
Method Summary | |
abstract int |
blockSize()
Return the number of bytes needed to make a valid hash. |
abstract Fingerprint |
calculate()
Return a fingerprint for the curret state, without destroying the state. |
static HashState |
create(java.lang.String algorithm)
Create a HashState object for the named fingerprint algorithm. |
abstract java.lang.String |
getName()
Return the name of the algorithm used by this HashState object. |
abstract int |
hashSize()
Returns the size of a fingerprint in bytes. |
abstract void |
reset()
Reset the state. |
void |
update(byte[] buf)
Update the fingerprint state with the bytes from buf . |
abstract void |
update(byte[] buf,
int offset,
int length)
Update the fingerprint state with the bytes from buf[offset, offset+length-1] . |
void |
update(java.lang.String s)
Update the fingerprint state with the characters from s . |
Methods inherited from class is.logi.crypto.Crypto |
binString,
binString,
equal,
equalRelaxed,
equalSub,
fromHexNibble,
fromHexString,
fromString,
fromString,
hexString,
hexString,
hexString,
hexString,
makeClass,
makeInt,
makeLong,
makeSessionKey,
pastSpace,
pickBits,
pickBits,
readInt,
writeBytes,
writeBytes,
writeInt |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HashState()
Method Detail |
public static HashState create(java.lang.String algorithm) throws InvalidCDSException
public abstract java.lang.String getName()
public abstract void reset()
public abstract void update(byte[] buf, int offset, int length)
buf[offset, offset+length-1]
.public void update(byte[] buf)
buf
.public void update(java.lang.String s)
s
.public abstract Fingerprint calculate()
public abstract int blockSize()
public abstract int hashSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |