1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Lightly obscure secrets

This commit is contained in:
Nick Craig-Wood
2015-09-01 22:33:34 +01:00
parent e2717a031e
commit c98a51b26c
5 changed files with 46 additions and 6 deletions

View File

@@ -55,3 +55,21 @@ func TestSizeSuffixSet(t *testing.T) {
}
}
}
func TestReveal(t *testing.T) {
for _, test := range []struct {
in string
want string
}{
{"", ""},
{"2sTcyNrA", "potato"},
} {
got := Reveal(test.in)
if got != test.want {
t.Errorf("%q: want %q got %q", test.in, test.want, got)
}
if Obscure(got) != test.in {
t.Errorf("%q: wasn't bidirectional", test.in)
}
}
}