From 140a3d0aef3c4acdecb3af4165617b9a439710f1 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 25 Aug 2016 21:26:55 +0100 Subject: [PATCH] b2: Fix encrypted uploads #644 This was caused by accidentally letting b2 read the underlying object sha1. --- crypt/crypt.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crypt/crypt.go b/crypt/crypt.go index 7365b3e85..d457a91f3 100644 --- a/crypt/crypt.go +++ b/crypt/crypt.go @@ -343,6 +343,12 @@ func (o *ObjectInfo) Size() int64 { return o.f.cipher.EncryptedSize(o.ObjectInfo.Size()) } +// Hash returns the selected checksum of the file +// If no checksum is available it returns "" +func (o *ObjectInfo) Hash(hash fs.HashType) (string, error) { + return "", nil +} + // ListOpts wraps a listopts decrypting the directory listing and // replacing the Objects type ListOpts struct {