All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class is.hi.logir.cryptonite.MD5State

java.lang.Object
   |
   +----is.hi.logir.cryptonite.Cryptonite
           |
           +----is.hi.logir.cryptonite.FingerprintState
                   |
                   +----is.hi.logir.cryptonite.MD5State

public class MD5State
extends FingerprintState
An object of this class holds the state of an MD5 fingerprint still being calculated.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
Fingerprint, Signature

Constructor Index

 o MD5State()
Create a new clear MD5State.

Method Index

 o blockSize()
Return the number of bytes needed to make a valid hash.
 o calculate()
Return a Fingerprint for the curret state, without destroying the state.
 o getName()
Return "MD5".
 o hashSize()
Returns the size of a fingerprint in bytes.
 o reset()
Reset the object.
 o update(byte[], int, int)
Update the fingerprint state with the bytes from buf[offset, offset+length-1].

Constructors

 o MD5State
 public MD5State()
Create a new clear MD5State.

Methods

 o getName
 public String getName()
Return "MD5".

Overrides:
getName in class FingerprintState
 o reset
 public void reset()
Reset the object.

Overrides:
reset in class FingerprintState
 o update
 public void update(byte buffer[],
                    int offset,
                    int length)
Update the fingerprint state with the bytes from buf[offset, offset+length-1].

Overrides:
update in class FingerprintState
 o calculate
 public Fingerprint calculate()
Return a Fingerprint for the curret state, without destroying the state.

Overrides:
calculate in class FingerprintState
 o blockSize
 public int blockSize()
Return the number of bytes needed to make a valid hash. If a multiple of this number of bytes is hashed, no padding is needed. If no such value exists, returns 0.

Overrides:
blockSize in class FingerprintState
 o hashSize
 public int hashSize()
Returns the size of a fingerprint in bytes.

Overrides:
hashSize in class FingerprintState

All Packages  Class Hierarchy  This Package  Previous  Next  Index