This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Security and the fly likes XOR to reduce md5 digest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "XOR to reduce md5 digest" Watch "XOR to reduce md5 digest" New topic
Author

XOR to reduce md5 digest

Arthur Ritus
Greenhorn

Joined: Dec 03, 2003
Posts: 5
Hello all,
Wondering if anyone can help me here:
I've found a nice method to generate an MD hash digest:
public static byte[] getKeyedDigest(byte[] buffer, byte[] key)
{
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(buffer);
return md5.digest(key);
}
catch (NoSuchAlgorithmException e) {
}
return null;
}
This produces a 16 byte (128 bit) digest.
I need to reduce this into an 8 byte field by doing a XOR between the 1st and 2nd 8 bytes of the digest. Sounds simple but i'm finding it tricky to code. If anyone has any ideas i'd be very grateful.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XOR to reduce md5 digest
 
Similar Threads
md5 or equivalent
MAC differs 1.3 vs 1.4
XOR in byte array
Method to manipulate byte arrays
MD5 encryption using MessageDigest