aboutsummaryrefslogtreecommitdiff
path: root/internal/contentenc
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-03-18 17:43:38 +0100
committerJakob Unterwurzacher2018-03-25 21:06:10 +0200
commit1ed3d51df1750d5472b1349222c352171f1e8d64 (patch)
treeb5f02aa633e8ebf1a71c4d1778a2e29310541d33 /internal/contentenc
parentf20974c4dad913a07ce5808005fe07084f87c95f (diff)
fusefrontend: add xattr support
At the moment, only for reverse mode. https://github.com/rfjakob/gocryptfs/issues/217
Diffstat (limited to 'internal/contentenc')
-rw-r--r--internal/contentenc/content.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/contentenc/content.go b/internal/contentenc/content.go
index e2a531c..c4ba7c9 100644
--- a/internal/contentenc/content.go
+++ b/internal/contentenc/content.go
@@ -131,10 +131,11 @@ func (be *ContentEnc) DecryptBlocks(ciphertext []byte, firstBlockNo uint64, file
// concatAD concatenates the block number and the file ID to a byte blob
// that can be passed to AES-GCM as associated data (AD).
-// Result is: aData = blockNo.bigEndian + fileID.
+// Result is: aData = [blockNo.bigEndian fileID].
func concatAD(blockNo uint64, fileID []byte) (aData []byte) {
if fileID != nil && len(fileID) != headerIDLen {
- // fileID is nil when decrypting the master key from the config file
+ // fileID is nil when decrypting the master key from the config file,
+ // and for symlinks and xattrs.
log.Panicf("wrong fileID length: %d", len(fileID))
}
const lenUint64 = 8