Class: DropboxContentHasher

DropboxContentHasher

Computes hashes using the same block-based algorithm as Dropbox's content_hash metadata field.

new DropboxContentHasher()

Methods


digest(encoding)

Returns the final Dropbox content hash.
Parameters:
Name Type Description
encoding 'hex' | undefined Optional output encoding.
Returns:
Binary digest, or a hexadecimal string.
Type
Buffer | string

update(data)

Adds binary data to the hash.
Parameters:
Name Type Description
data Buffer | Uint8Array | ArrayBuffer Binary data to hash.
Returns:
This hasher instance.
Type
DropboxContentHasher