summaryrefslogtreecommitdiff
path: root/internal/readpassword/stdin_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-02-18 14:26:54 +0100
committerJakob Unterwurzacher2018-02-18 14:26:54 +0100
commit3b8f5cbb17c964224456bb36b096feafb0e24f44 (patch)
tree1caae8dbf736510b971790b94c1975b325dfe377 /internal/readpassword/stdin_test.go
parent14c063428dcded6a1060395bb45bf7bd5d185738 (diff)
readpassword: convert from string to []byte
This will allows us to overwrite the password with zeros once we are done with it. https://github.com/rfjakob/gocryptfs/issues/211
Diffstat (limited to 'internal/readpassword/stdin_test.go')
-rw-r--r--internal/readpassword/stdin_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/readpassword/stdin_test.go b/internal/readpassword/stdin_test.go
index 2d9f93f..8cf9954 100644
--- a/internal/readpassword/stdin_test.go
+++ b/internal/readpassword/stdin_test.go
@@ -11,7 +11,7 @@ import (
func TestStdin(t *testing.T) {
p1 := "g55434t55wef"
if os.Getenv("TEST_SLAVE") == "1" {
- p2 := readPasswordStdin()
+ p2 := string(readPasswordStdin())
if p1 != p2 {
fmt.Fprintf(os.Stderr, "%q != %q", p1, p2)
os.Exit(1)
@@ -44,7 +44,7 @@ func TestStdin(t *testing.T) {
func TestStdinEof(t *testing.T) {
p1 := "asd45as5f4a36"
if os.Getenv("TEST_SLAVE") == "1" {
- p2 := readPasswordStdin()
+ p2 := string(readPasswordStdin())
if p1 != p2 {
fmt.Fprintf(os.Stderr, "%q != %q", p1, p2)
os.Exit(1)