aboutsummaryrefslogtreecommitdiff
path: root/internal/contentenc/content.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/contentenc/content.go')
-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