kunt

golang IRC bot
git clone git://git.2f30.org/kunt
Log | Files | Refs | LICENSE

commit 90c6a197e5b4c24bd9a4ee0510e0f317b412a0a9
parent f583b2d142a260f4b4509bfe15564b5ab83ebfaf
Author: sin <sin@2f30.org>
Date:   Tue, 30 Apr 2013 14:55:01 +0100

update mapfs

Diffstat:
Msrc/mapfs/mapfs.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/mapfs/mapfs.go b/src/mapfs/mapfs.go @@ -300,7 +300,8 @@ func (m *Mapfs) encryptBuf(a []byte) []byte { m.cipher.Encrypt(ct[i:], padded[i:]) return ct } - m.cipher.Encrypt(ct[i:i+blowfish.BlockSize], padded[i:i+blowfish.BlockSize]) + m.cipher.Encrypt(ct[i:i+blowfish.BlockSize], + padded[i:i+blowfish.BlockSize]) } return ct } @@ -308,7 +309,8 @@ func (m *Mapfs) encryptBuf(a []byte) []byte { func (m *Mapfs) decryptBuf(a []byte) []byte { pt := make([]byte, len(a)) for i := 0; i < len(a); i += blowfish.BlockSize { - m.cipher.Decrypt(pt[i:i+blowfish.BlockSize], a[i:i+blowfish.BlockSize]) + m.cipher.Decrypt(pt[i:i+blowfish.BlockSize], + a[i:i+blowfish.BlockSize]) } return pt }