md5

Compute the md5 hash of the input catching all the irritating exceptions
for you

Parameters:

input - The input to take the hash of

Returns:

The MD5 hash of the input bytes

sha1

public static byte[] sha1(byte[] input)

Compute the sha1 hash of the input catching all the irritating exceptions
for you

Parameters:

input - The input to take the hash of

Returns:

The sha1 hash of the input bytes

compare

public static int compare(byte[] b1,
byte[] b2)

Compare two byte arrays. Two arrays are equal if they are the same size
and have the same contents. Otherwise b1 is smaller iff it is a prefix of
b2 or for the first index i for which b1[i] != b2[i], b1[i] < b2[i].

bytes are considered unsigned. passing negative values into byte
will cause them to be considered as unsigned two's complement value.