diff options
author | Jakob Unterwurzacher | 2015-09-06 10:38:43 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-09-06 10:42:34 +0200 |
commit | 58d1e24b7c4eb69376dd0ec230c42ea9aeb70f2d (patch) | |
tree | ac99fc15a5ab2f34fc85ac13188ffa6e4dc11815 /cryptfs/cryptfs_content.go | |
parent | ad3a1a88994bbf54e95295d70f7424b67894da3e (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.go | 3 |
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 } |