aboutsummaryrefslogtreecommitdiff
path: root/internal/configfile/config_file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-21 14:04:04 +0200
committerJakob Unterwurzacher2021-08-21 14:04:04 +0200
commitb603169d2ccd47013d46bfcb33c1c105342cff95 (patch)
tree6cb326f8e4a86da49de15518c4efa1296fc6fed1 /internal/configfile/config_file.go
parent4b93525249e7dca3b76a4a2be924c4d57a4d81e1 (diff)
configfile: pass struct to Create 2/2
Drop Create and rename Create2 to Create.
Diffstat (limited to 'internal/configfile/config_file.go')
-rw-r--r--internal/configfile/config_file.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/internal/configfile/config_file.go b/internal/configfile/config_file.go
index db29f43..025e1c3 100644
--- a/internal/configfile/config_file.go
+++ b/internal/configfile/config_file.go
@@ -90,29 +90,10 @@ type CreateArgs struct {
DeterministicNames bool
}
-func Create(filename string, password []byte, plaintextNames bool,
- logN int, creator string, aessiv bool, devrandom bool,
- fido2CredentialID []byte, fido2HmacSalt []byte, deterministicNames bool) error {
- args := CreateArgs{
- Filename: filename,
- Password: password,
- PlaintextNames: plaintextNames,
- LogN: logN,
- Creator: creator,
- AESSIV: aessiv,
- Devrandom: devrandom,
- Fido2CredentialID: fido2CredentialID,
- Fido2HmacSalt: fido2HmacSalt,
- DeterministicNames: deterministicNames,
- }
- log.Panicf("Use Create2(%#v) instead\n", args)
- return nil
-}
-
// Create - create a new config with a random key encrypted with
// "Password" and write it to "Filename".
// Uses scrypt with cost parameter "LogN".
-func Create2(args *CreateArgs) error {
+func Create(args *CreateArgs) error {
var cf ConfFile
cf.filename = args.Filename
cf.Creator = args.Creator