aboutsummaryrefslogtreecommitdiff
path: root/internal/contentenc/content.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-15 23:30:44 +0200
committerJakob Unterwurzacher2016-06-15 23:30:44 +0200
commit6c3f97399a01a2d8480b39978209099335efbf7d (patch)
tree097b34a37b5f62ebcfd7294d096b16f436c180f9 /internal/contentenc/content.go
parent09e88f31d1b4308bf82c7f4eb0dd83855ad67ffc (diff)
Rename internal "toggledlog" package to "tlog"
tlog is used heavily everywhere and deserves a shorter name. Renamed using sed magic, without any manual rework: find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
Diffstat (limited to 'internal/contentenc/content.go')
-rw-r--r--internal/contentenc/content.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/contentenc/content.go b/internal/contentenc/content.go
index dd6aa26..5bac2a2 100644
--- a/internal/contentenc/content.go
+++ b/internal/contentenc/content.go
@@ -8,7 +8,7 @@ import (
"encoding/hex"
"errors"
- "github.com/rfjakob/gocryptfs/internal/toggledlog"
+ "github.com/rfjakob/gocryptfs/internal/tlog"
)
// DecryptBlocks - Decrypt a number of blocks
@@ -42,12 +42,12 @@ func (be *ContentEnc) DecryptBlock(ciphertext []byte, blockNo uint64, fileId []b
// All-zero block?
if bytes.Equal(ciphertext, be.allZeroBlock) {
- toggledlog.Debug.Printf("DecryptBlock: file hole encountered")
+ tlog.Debug.Printf("DecryptBlock: file hole encountered")
return make([]byte, be.plainBS), nil
}
if len(ciphertext) < be.cryptoCore.IVLen {
- toggledlog.Warn.Printf("DecryptBlock: Block is too short: %d bytes", len(ciphertext))
+ tlog.Warn.Printf("DecryptBlock: Block is too short: %d bytes", len(ciphertext))
return nil, errors.New("Block is too short")
}
@@ -64,8 +64,8 @@ func (be *ContentEnc) DecryptBlock(ciphertext []byte, blockNo uint64, fileId []b
plaintext, err := be.cryptoCore.Gcm.Open(plaintext, nonce, ciphertext, aData)
if err != nil {
- toggledlog.Warn.Printf("DecryptBlock: %s, len=%d", err.Error(), len(ciphertextOrig))
- toggledlog.Debug.Println(hex.Dump(ciphertextOrig))
+ tlog.Warn.Printf("DecryptBlock: %s, len=%d", err.Error(), len(ciphertextOrig))
+ tlog.Debug.Println(hex.Dump(ciphertextOrig))
return nil, err
}