aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/cryptfs.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-01-21 22:59:11 +0100
committerJakob Unterwurzacher2016-01-21 22:59:11 +0100
commitd1631696556cb6460db1d6eedf9fbc3015433b1c (patch)
treea2665626d35a55d82cc41bdc0dce28710e1fa01f /cryptfs/cryptfs.go
parent9bab220a1b5a10c00c314b15f4c9f879f1473707 (diff)
Wrap Logger to make disabling output more efficient
Instead of using SetOutput(ioutil.Discard), which means that Printf is still called for every debug message, use a simple and fast boolean check. Streaming write performance improves from 86 to 93 MB/s.
Diffstat (limited to 'cryptfs/cryptfs.go')
-rw-r--r--cryptfs/cryptfs.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cryptfs/cryptfs.go b/cryptfs/cryptfs.go
index 232129f..5b3f074 100644
--- a/cryptfs/cryptfs.go
+++ b/cryptfs/cryptfs.go
@@ -9,6 +9,8 @@ import (
)
const (
+ PROGRAM_NAME = "gocryptfs"
+
DEFAULT_PLAINBS = 4096
KEY_LEN = 32 // AES-256
AUTH_TAG_LEN = 16