Hello, you can simply able to create a keyed Digest Using MD5 algorithm. As we know the keyed digest is the digest in which the secret key is used for making a digest for your buff of bytes. And it is also possible to use different keys for creating different digests. For getting reference you can simply make use of the code below:
Code:
public static byte[] getKeyedDigest(byte[] buff, byte[] key)
{
try
{
MessageDigest msgdigest = MessageDigest.getInstance("MD5");
msgdigest.update(buff);
return msgdigest.digest(key);
}
catch (NoSuchAlgorithmException nsae)
{
}
return null;
}
Bookmarks