@PublicationReference(author="Wikipedia",title="MD5",type=WebPage,year=2010) @PublicationReference(author="Jon Howell",title="MD5 Java class",type=Misc,year=1999,url="http://www.jonh.net/~jonh/md5/MD5.java",notes="A fairly inefficient implementation, but a correct one!") public class MD5Hash extends AbstractHashFunction
Modifier and Type | Field and Description |
---|---|
protected static byte[] |
DEFAULT_SEED
Default seed
|
static int |
LENGTH
MD5 is a 128-bit (16-byte) length hash.
|
Constructor and Description |
---|
MD5Hash()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
evaluateInto(byte[] input,
byte[] output,
byte[] seed)
Evaluates the input into the given output
|
byte[] |
getDefaultSeed()
Gets the default seed for the hash function
|
int |
length()
Returns the number of bytes in the output hash code.
|
void |
update(byte[] newbuf,
int bufstart,
int buflen)
Interior MD5 update step
|
clone, evaluate, evaluate, evaluateInto
public static final int LENGTH
protected static final byte[] DEFAULT_SEED
public void evaluateInto(byte[] input, byte[] output, byte[] seed)
HashFunction
input
- Input to compute the hash-function value ofoutput
- Output to put the hash-function intoseed
- Seed to offset the hash code.public int length()
HashFunction
public byte[] getDefaultSeed()
HashFunction
public void update(byte[] newbuf, int bufstart, int buflen)
newbuf
- new buffer to updatebufstart
- Offset into the buffer to updatebuflen
- how many bytes to update (not necessarily all of them!)