Google-drive – Getting hashes of Google Docs documents

google-drive

Although Google Docs documents seem to have a unique ID in the URL, I'm wondering if there is a way to get a hash (MD5, SHA1) of a document without downloading it again. Has anyone attempted something similar? Is there some API call I can make?

Best Answer

There is an API call, documented in at the link.

md5Checksum: string, An MD5 checksum for the content of this file. This is populated only for files with content stored in Drive.

In java you can retrieve it by adding a line to this java example

 System.out.println("MD5: " + file.getMd5Checksum());