We're trying to avoid saving duplicate files. However, our md5 result is always different from BlobInfo.
How we calculate it:
MessageDigest messageDigest = java.security.MessageDigest.getInstance("MD5");
digest = messageDigest.digest(bytes);
String digestString = DigestUtils.md5Hex(digest);
It doesn't match:with (new BlobInfoFactory().loadBlobInfo(blobKey)).getMd5Hash();
Example mismatches:
google vs my own calculation:
8cdeb6db94bc4fd156e2975fd8ebbcf2 vs 9003b37afbf3637de96c35774069453f
65a25dafcba58d16d58a9c7585cc3932 vs 52383159f7d27417d50121aaee2728b5
5cccc2d690fdc0c254234d5526876b34 vs 8196da9b6733daa60e08d927693df483
It is on production server. ( we didn't test dev environment )