summaryrefslogtreecommitdiff
path: root/masterkey.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-11-14 21:25:10 +0100
committerJakob Unterwurzacher2015-11-14 21:25:10 +0100
commit58592330dc33e194e55fa942d3f375124839f058 (patch)
tree7b523afe12b7382556ca591768e05ed397b0512f /masterkey.go
parent6736212b29bd54a0ed9778f1bbea49db03f43c06 (diff)
Refactor cli argument handling
Also, add the "-config" option for storing gocryptfs.conf outside of CIPHERDIR.
Diffstat (limited to 'masterkey.go')
-rw-r--r--masterkey.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/masterkey.go b/masterkey.go
index a1889b4..2062997 100644
--- a/masterkey.go
+++ b/masterkey.go
@@ -37,7 +37,8 @@ paper and store it in a drawer.
`, hChunked)
}
-// Parse a hex-encoded master key that was passed on the command line
+// parseMasterKey - Parse a hex-encoded master key that was passed on the command line
+// Calls os.Exit on failure
func parseMasterKey(masterkey string) []byte {
masterkey = strings.Replace(masterkey, "-", "", -1)
key, err := hex.DecodeString(masterkey)