rclone/backend/crypt
Nick Craig-Wood 1648c1a0f3 crypt: calculate hashes for uploads from local disk
Before this change crypt would not calculate hashes for files it was
uploading. This is because, in the general case, they have to be
downloaded, encrypted and hashed which is too resource intensive.

However this causes backends which need the hash first before
uploading (eg s3/b2 when uploading chunked files) not to have a hash
of the file. This causes cryptcheck to complain about missing hashes
on large files uploaded via s3/b2.

This change calculates hashes for the upload if the upload is coming
from a local filesystem. It does this by encrypting and hashing the
local file re-using the code used by cryptcheck. For a local disk this
is not a lot more intensive than calculating the hash.

See: https://forum.rclone.org/t/strange-output-for-cryptcheck/15437
Fixes: #2809
2020-04-22 11:33:48 +01:00
..
pkcs7 Move all backends into backend directory 2018-01-12 17:07:38 +00:00
cipher_test.go lib/readers: factor ErrorReader from multiple sources 2020-04-19 15:18:49 +01:00
cipher.go crypt: calculate hashes for uploads from local disk 2020-04-22 11:33:48 +01:00
crypt_internal_test.go crypt: calculate hashes for uploads from local disk 2020-04-22 11:33:48 +01:00
crypt_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
crypt.go crypt: calculate hashes for uploads from local disk 2020-04-22 11:33:48 +01:00