Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Dropbox API's Content_Hash? #27

Open
JamoCA opened this issue Jan 7, 2023 · 0 comments
Open

Add support for Dropbox API's Content_Hash? #27

JamoCA opened this issue Jan 7, 2023 · 0 comments

Comments

@JamoCA
Copy link

JamoCA commented Jan 7, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant