From de56fe9e3503d98e359551072633c804794b94e1 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 3 Nov 2015 00:00:13 +0100 Subject: Implement PlainTextNames mode Also, forbid access to "gocryptfs.conf" in the root dir. --- cryptfs/cryptfs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cryptfs/cryptfs.go') diff --git a/cryptfs/cryptfs.go b/cryptfs/cryptfs.go index 9fe492d..ed19b26 100644 --- a/cryptfs/cryptfs.go +++ b/cryptfs/cryptfs.go @@ -23,9 +23,10 @@ type CryptFS struct { cipherBS uint64 // Stores an all-zero block of size cipherBS allZeroBlock []byte + plaintextNames bool } -func NewCryptFS(key []byte, useOpenssl bool) *CryptFS { +func NewCryptFS(key []byte, useOpenssl bool, plaintextNames bool) *CryptFS { if len(key) != KEY_LEN { panic(fmt.Sprintf("Unsupported key length %d", len(key))) @@ -54,6 +55,7 @@ func NewCryptFS(key []byte, useOpenssl bool) *CryptFS { plainBS: DEFAULT_PLAINBS, cipherBS: uint64(cipherBS), allZeroBlock: make([]byte, cipherBS), + plaintextNames: plaintextNames, } } -- cgit v1.2.3