Documentation
¶
Overview ¶
Package khash provides the kDrive specific hash handling.
kDrive uses XXH3-64 for file hashing. Files uploaded in chunks (by rclone, or by the kDrive apps which each use their own chunk size) get a "nested" hash: the XXH3 of the concatenated lowercase hex strings of the individual chunk hashes. Such a nested hash can't be compared with a plain XXH3 of the file contents.
Hash formats returned by the kDrive API:
- "xxh3:HASH" for a plain XXH3 of the file contents
- "N:xxh3:HASH" for the nested hash of a chunked upload
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NestedChunkHash ¶
NestedChunkHash computes the kDrive nested hash from the hashes of the file chunks, in order.
kDrive stores the nested hash of a chunked file as the XXH3 of the concatenated lowercase hex strings of the individual chunk hashes. Each chunk hash may be passed with or without the "xxh3:" prefix.
Types ¶
This section is empty.