aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/config_file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-12-10 19:38:02 +0100
committerJakob Unterwurzacher2015-12-10 19:38:02 +0100
commitb4b9072cc2cb55f177909d4c497f25c3fd1abaf5 (patch)
tree4da49f75c8c6f5426b8f1b624385e4016b2b19db /cryptfs/config_file.go
parentccf6d00728a8cb107ae2a829f89e7e234e468efb (diff)
Simplify CreateConfFile: do not allow specification of EMENames
Diffstat (limited to 'cryptfs/config_file.go')
-rw-r--r--cryptfs/config_file.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/cryptfs/config_file.go b/cryptfs/config_file.go
index bf1f2a0..48e5474 100644
--- a/cryptfs/config_file.go
+++ b/cryptfs/config_file.go
@@ -33,9 +33,10 @@ type ConfFile struct {
// CreateConfFile - create a new config with a random key encrypted with
// "password" and write it to "filename".
// Uses scrypt with cost parameter logN.
-func CreateConfFile(filename string, password string, plaintextNames bool, logN int, EMENames bool) error {
+func CreateConfFile(filename string, password string, plaintextNames bool, logN int) error {
var cf ConfFile
cf.filename = filename
+ cf.Version = HEADER_CURRENT_VERSION
// Generate new random master key
key := RandBytes(KEY_LEN)
@@ -44,10 +45,7 @@ func CreateConfFile(filename string, password string, plaintextNames bool, logN
// This sets ScryptObject and EncryptedKey
cf.EncryptKey(key, password, logN)
- // Set defaults
- cf.Version = HEADER_CURRENT_VERSION
-
- // Set values chosen by the user
+ // Set feature flags
if plaintextNames {
cf.FeatureFlags = append(cf.FeatureFlags, FlagPlaintextNames)
} else {