summaryrefslogtreecommitdiff
path: root/cryptfs/cryptfs_content.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-09-06 10:38:43 +0200
committerJakob Unterwurzacher2015-09-06 10:42:34 +0200
commit58d1e24b7c4eb69376dd0ec230c42ea9aeb70f2d (patch)
treeac99fc15a5ab2f34fc85ac13188ffa6e4dc11815 /cryptfs/cryptfs_content.go
parentad3a1a88994bbf54e95295d70f7424b67894da3e (diff)
Add OpenSSL support for file content encryption/decryption
This brings streaming read performance from 30MB/s to 81MB/s (similar improvement for writes)
Diffstat (limited to 'cryptfs/cryptfs_content.go')
-rw-r--r--cryptfs/cryptfs_content.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cryptfs/cryptfs_content.go b/cryptfs/cryptfs_content.go
index 512bca9..4658529 100644
--- a/cryptfs/cryptfs_content.go
+++ b/cryptfs/cryptfs_content.go
@@ -49,8 +49,11 @@ func (be *CryptFS) DecryptBlock(ciphertext []byte) ([]byte, error) {
// Decrypt
var plaintext []byte
+
plaintext, err := be.gcm.Open(plaintext, nonce, ciphertext, nil)
+
if err != nil {
+ Warn.Printf("DecryptBlock: %s\n", err.Error())
return nil, err
}