diff options
author | Frank Denis | 2025-03-12 00:32:04 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2025-03-12 20:43:23 +0100 |
commit | 3e852eb354f99fb95b399c68d950298b33ed88ab (patch) | |
tree | 6218e3b655e5ebf778c026b9dee5b1fe3f306950 /masterkey.go | |
parent | e9d6fb4b3f16d04fa56a66acad46eafad4f8aba1 (diff) |
Do what @rfjakob asked me to do
Diffstat (limited to 'masterkey.go')
-rw-r--r-- | masterkey.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/masterkey.go b/masterkey.go index 90f0adf..d488441 100644 --- a/masterkey.go +++ b/masterkey.go @@ -20,8 +20,8 @@ func unhexMasterKey(masterkey string, fromStdin bool) []byte { tlog.Fatal.Printf("Could not parse master key: %v", err) os.Exit(exitcodes.MasterKey) } - if len(key) != cryptocore.MaxKeyLen { - tlog.Fatal.Printf("Master key has length %d but we require length %d", len(key), cryptocore.MaxKeyLen) + if len(key) != cryptocore.KeyLen { + tlog.Fatal.Printf("Master key has length %d but we require length %d", len(key), cryptocore.KeyLen) os.Exit(exitcodes.MasterKey) } tlog.Info.Printf("Using explicit master key.") @@ -56,7 +56,7 @@ func handleArgsMasterkey(args *argContainer) (masterkey []byte) { tlog.Info.Printf(tlog.ColorYellow + "ZEROKEY MODE PROVIDES NO SECURITY AT ALL AND SHOULD ONLY BE USED FOR TESTING." + tlog.ColorReset) - return make([]byte, cryptocore.MaxKeyLen) + return make([]byte, cryptocore.KeyLen) } // No master key source specified on the command line. Caller must parse // the config file. |