summaryrefslogtreecommitdiff
path: root/cryptfs
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-02 23:08:51 +0100
committerJakob Unterwurzacher2015-11-02 23:09:51 +0100
commit0ec17c3939ea89b353d9419da591a75fe44df6a2 (patch)
treef17655eef7cf9a4ffada2a10f64f4443824cfc2a /cryptfs
parenta3244070829202ba8e1d52580d0ce7f76b16fe6c (diff)
Add "--plaintextnames" option
Also, gather all the command line arguments into an anonymous struct "args".
Diffstat (limited to 'cryptfs')
-rw-r--r--cryptfs/config_file.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/cryptfs/config_file.go b/cryptfs/config_file.go
index 16a3eec..de3054a 100644
--- a/cryptfs/config_file.go
+++ b/cryptfs/config_file.go
@@ -22,11 +22,13 @@ type ConfFile struct {
ScryptObject scryptKdf
// The On-Disk-Format version this filesystem uses
Version uint16
+ // Do not encrypt filenames
+ PlaintextNames bool
}
// CreateConfFile - create a new config with a random key encrypted with
// "password" and write it to "filename"
-func CreateConfFile(filename string, password string) error {
+func CreateConfFile(filename string, password string, plaintextNames bool) error {
var cf ConfFile
cf.filename = filename
@@ -39,10 +41,10 @@ func CreateConfFile(filename string, password string) error {
cf.Version = HEADER_CURRENT_VERSION
- // Write file to disk
- err := cf.WriteFile()
+ cf.PlaintextNames = plaintextNames
- return err
+ // Write file to disk
+ return cf.WriteFile()
}
// LoadConfFile - read config file from disk and decrypt the