aboutsummaryrefslogtreecommitdiff
path: root/cryptfs
diff options
context:
space:
mode:
Diffstat (limited to 'cryptfs')
-rw-r--r--cryptfs/cryptfs.go2
-rw-r--r--cryptfs/cryptfs_names.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/cryptfs/cryptfs.go b/cryptfs/cryptfs.go
index 783bfb8..63febc3 100644
--- a/cryptfs/cryptfs.go
+++ b/cryptfs/cryptfs.go
@@ -14,6 +14,8 @@ const (
NONCE_LEN = 12
AUTH_TAG_LEN = 16
BLOCK_OVERHEAD = NONCE_LEN + AUTH_TAG_LEN
+ DIRIV_LEN = 16 // identical to AES block size
+ DIRIV_FILENAME = "gocryptfs.diriv"
)
type CryptFS struct {
diff --git a/cryptfs/cryptfs_names.go b/cryptfs/cryptfs_names.go
index a7a9a8c..1282f53 100644
--- a/cryptfs/cryptfs_names.go
+++ b/cryptfs/cryptfs_names.go
@@ -31,7 +31,7 @@ func (be *CryptFS) decryptName(cipherName string) (string, error) {
}
if len(bin)%aes.BlockSize != 0 {
- return "", errors.New(fmt.Sprintf("Name len=%d is not a multiple of 16", len(bin)))
+ return "", fmt.Errorf("Decoded length %d is not a multiple of the AES block size", len(bin))
}
iv := make([]byte, aes.BlockSize) // TODO ?