aboutsummaryrefslogtreecommitdiff
path: root/gocryptfs-xray/xray_main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-02-18 15:22:22 +0100
committerJakob Unterwurzacher2018-02-18 15:22:22 +0100
commit2cf050d69e9cab45015619e48ea96993129bab44 (patch)
tree097ed3e3da99be30861614804e1e886dff15b76f /gocryptfs-xray/xray_main.go
parent3b8f5cbb17c964224456bb36b096feafb0e24f44 (diff)
main: zero password once we are done with it
Overwrite the password we have got from the user with zeros once we don't need it anymore, and make sure the variable runs out of scope.
Diffstat (limited to 'gocryptfs-xray/xray_main.go')
-rw-r--r--gocryptfs-xray/xray_main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/gocryptfs-xray/xray_main.go b/gocryptfs-xray/xray_main.go
index 85470ec..522878a 100644
--- a/gocryptfs-xray/xray_main.go
+++ b/gocryptfs-xray/xray_main.go
@@ -67,6 +67,9 @@ func dumpMasterKey(fn string) {
exitcodes.Exit(err)
}
fmt.Println(hex.EncodeToString(masterkey))
+ for i := range pw {
+ pw[i] = 0
+ }
}
func inspectCiphertext(fd *os.File) {