summaryrefslogtreecommitdiff
path: root/masterkey.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-15 23:30:44 +0200
committerJakob Unterwurzacher2016-06-15 23:30:44 +0200
commit6c3f97399a01a2d8480b39978209099335efbf7d (patch)
tree097b34a37b5f62ebcfd7294d096b16f436c180f9 /masterkey.go
parent09e88f31d1b4308bf82c7f4eb0dd83855ad67ffc (diff)
Rename internal "toggledlog" package to "tlog"
tlog is used heavily everywhere and deserves a shorter name. Renamed using sed magic, without any manual rework: find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
Diffstat (limited to 'masterkey.go')
-rw-r--r--masterkey.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/masterkey.go b/masterkey.go
index 55da1ea..2a93a38 100644
--- a/masterkey.go
+++ b/masterkey.go
@@ -6,7 +6,7 @@ import (
"strings"
"github.com/rfjakob/gocryptfs/internal/cryptocore"
- "github.com/rfjakob/gocryptfs/internal/toggledlog"
+ "github.com/rfjakob/gocryptfs/internal/tlog"
)
// printMasterKey - remind the user that he should store the master key in
@@ -26,7 +26,7 @@ func printMasterKey(key []byte) {
}
}
- toggledlog.Info.Printf(`
+ tlog.Info.Printf(`
Your master key is:
%s
@@ -35,7 +35,7 @@ If the gocryptfs.conf file becomes corrupted or you ever forget your password,
there is only one hope for recovery: The master key. Print it to a piece of
paper and store it in a drawer.
-`, toggledlog.ColorGrey+hChunked+toggledlog.ColorReset)
+`, tlog.ColorGrey+hChunked+tlog.ColorReset)
}
// parseMasterKey - Parse a hex-encoded master key that was passed on the command line
@@ -44,11 +44,11 @@ func parseMasterKey(masterkey string) []byte {
masterkey = strings.Replace(masterkey, "-", "", -1)
key, err := hex.DecodeString(masterkey)
if err != nil {
- toggledlog.Fatal.Printf("Could not parse master key: %v\n", err)
+ tlog.Fatal.Printf("Could not parse master key: %v\n", err)
os.Exit(1)
}
if len(key) != cryptocore.KeyLen {
- toggledlog.Fatal.Printf("Master key has length %d but we require length %d\n", len(key), cryptocore.KeyLen)
+ tlog.Fatal.Printf("Master key has length %d but we require length %d\n", len(key), cryptocore.KeyLen)
os.Exit(1)
}
return key