diff options
author | Jakob Unterwurzacher | 2015-11-03 00:00:13 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-11-03 00:00:13 +0100 |
commit | de56fe9e3503d98e359551072633c804794b94e1 (patch) | |
tree | c9748200eb69eabd2fbfe1b019380a403f20ccb7 /cryptfs/cryptfs.go | |
parent | 66db3ad086692d249bdf8e14921760f7a460bb99 (diff) |
Implement PlainTextNames mode
Also, forbid access to "gocryptfs.conf" in the root dir.
Diffstat (limited to 'cryptfs/cryptfs.go')
-rw-r--r-- | cryptfs/cryptfs.go | 4 |
1 files changed, 3 insertions, 1 deletions
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, } } |