From 17f0eb13396ad31083e786ed64aef368646c2aa6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 20 Jan 2016 20:55:56 +0100 Subject: Convert logging to standard Go log.Logger This is in preparation of logging to syslog. --- cryptfs/cryptfs_content.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cryptfs/cryptfs_content.go') 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 } -- cgit v1.2.3