hellzerg/hashing

Add support for Dropbox API's Content_Hash?

JamoCA opened this issue · 0 comments

Are there any plans to add support for Dropbox API's content_hash?

To calculate the content_hash of a file:

  • Split the file into blocks of 4 MB (4,194,304 or 4 * 1024 * 1024 bytes). The last block (if any) may be smaller than 4 MB.
  • Compute the hash of each block using SHA-256.
  • Concatenate the hash of all blocks in the binary format to form a single binary string.
  • Compute the hash of the concatenated string using SHA-256. Output the resulting hash in hexadecimal format.

More info regarding it can be found here:
https://www.dropbox.com/developers/reference/content-hash

Here's the repo with example code in popular languages:
https://github.com/dropbox/dropbox-api-content-hasher