summaryrefslogtreecommitdiff
path: root/gocryptfs-xray/xray_main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-05-10 00:04:14 +0200
committerJakob Unterwurzacher2020-05-10 00:04:14 +0200
commita9895b34872d2299cfe424444fab15516e7f96c9 (patch)
tree0d5a1c28e0f4cbac700b28c5298cdbbf8dd77b83 /gocryptfs-xray/xray_main.go
parentf2e8b776f8d2f4cff928e127798fc8c98ca2fbc5 (diff)
gocryptfs-xray: add -0 flag, add tests
The -0 flags works like xargs -0.
Diffstat (limited to 'gocryptfs-xray/xray_main.go')
-rw-r--r--gocryptfs-xray/xray_main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/gocryptfs-xray/xray_main.go b/gocryptfs-xray/xray_main.go
index 0777524..8dcaf8d 100644
--- a/gocryptfs-xray/xray_main.go
+++ b/gocryptfs-xray/xray_main.go
@@ -65,10 +65,12 @@ func main() {
decryptPaths *bool
encryptPaths *bool
aessiv *bool
+ sep0 *bool
}
args.dumpmasterkey = flag.Bool("dumpmasterkey", false, "Decrypt and dump the master key")
args.decryptPaths = flag.Bool("decrypt-paths", false, "Decrypt file paths using gocryptfs control socket")
args.encryptPaths = flag.Bool("encrypt-paths", false, "Encrypt file paths using gocryptfs control socket")
+ args.sep0 = flag.Bool("0", false, "Use \\0 instead of \\n as separator")
args.aessiv = flag.Bool("aessiv", false, "Assume AES-SIV mode instead of AES-GCM")
flag.Usage = usage
flag.Parse()
@@ -83,10 +85,10 @@ func main() {
}
fn := flag.Arg(0)
if *args.decryptPaths {
- decryptPaths(fn)
+ decryptPaths(fn, *args.sep0)
}
if *args.encryptPaths {
- encryptPaths(fn)
+ encryptPaths(fn, *args.sep0)
}
fd, err := os.Open(fn)
if err != nil {