aboutsummaryrefslogtreecommitdiff
path: root/cryptfs/cryptfs_content.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-01-20 20:55:56 +0100
committerJakob Unterwurzacher2016-01-20 20:57:00 +0100
commit17f0eb13396ad31083e786ed64aef368646c2aa6 (patch)
treeaf6ca1565ce456d41290ca956e4209d29413509c /cryptfs/cryptfs_content.go
parentb9dd9e9a1cfabd4ecf7f4d3996b0a2c24cee75b4 (diff)
Convert logging to standard Go log.Logger
This is in preparation of logging to syslog.
Diffstat (limited to 'cryptfs/cryptfs_content.go')
-rw-r--r--cryptfs/cryptfs_content.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cryptfs/cryptfs_content.go b/cryptfs/cryptfs_content.go
index 9a79db4..2036e58 100644
--- a/cryptfs/cryptfs_content.go
+++ b/cryptfs/cryptfs_content.go
@@ -55,12 +55,12 @@ func (be *CryptFS) DecryptBlock(ciphertext []byte, blockNo uint64, fileId []byte
// All-zero block?
if bytes.Equal(ciphertext, be.allZeroBlock) {
- Debug.Printf("DecryptBlock: file hole encountered\n")
+ Debug.Printf("DecryptBlock: file hole encountered")
return make([]byte, be.plainBS), nil
}
if len(ciphertext) < be.gcmIVLen {
- Warn.Printf("DecryptBlock: Block is too short: %d bytes\n", len(ciphertext))
+ Warn.Printf("DecryptBlock: Block is too short: %d bytes", len(ciphertext))
return nil, errors.New("Block is too short")
}
@@ -77,7 +77,7 @@ func (be *CryptFS) DecryptBlock(ciphertext []byte, blockNo uint64, fileId []byte
plaintext, err := be.gcm.Open(plaintext, nonce, ciphertext, aData)
if err != nil {
- Warn.Printf("DecryptBlock: %s, len=%d, md5=%s\n", err.Error(), len(ciphertextOrig), Warn.Md5sum(ciphertextOrig))
+ Warn.Printf("DecryptBlock: %s, len=%d, md5=%s", err.Error(), len(ciphertextOrig), md5sum(ciphertextOrig))
Debug.Println(hex.Dump(ciphertextOrig))
return nil, err
}