aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-22 23:55:43 +0100
committerJakob Unterwurzacher2017-02-22 23:56:34 +0100
commit1e03e059fa0980db8d527f1c01094999d8813b95 (patch)
tree950f537f1fa58e9f0506a540b31d790030e69a1d /main.go
parentb056776a013813e251aa37027c3aaa3f1e22d7c8 (diff)
Implement "gocryptfs -speed"
A crypto benchmark mode like "openssl speed". Example run: $ ./gocryptfs -speed AES-GCM-256-OpenSSL 180.89 MB/s (selected in auto mode) AES-GCM-256-Go 48.19 MB/s AES-SIV-512-Go 37.40 MB/s
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index 21f2d06..9301ae1 100644
--- a/main.go
+++ b/main.go
@@ -13,6 +13,7 @@ import (
"github.com/rfjakob/gocryptfs/internal/configfile"
"github.com/rfjakob/gocryptfs/internal/contentenc"
"github.com/rfjakob/gocryptfs/internal/readpassword"
+ "github.com/rfjakob/gocryptfs/internal/speed"
"github.com/rfjakob/gocryptfs/internal/stupidgcm"
"github.com/rfjakob/gocryptfs/internal/tlog"
)
@@ -149,6 +150,11 @@ func main() {
printVersion()
os.Exit(0)
}
+ // "-speed"
+ if args.speed {
+ speed.Run()
+ os.Exit(0)
+ }
if args.wpanic {
tlog.Warn.Wpanic = true
tlog.Debug.Printf("Panicing on warnings")