From 3a940a6e2c354edf7b754d0dc5471dd46525ac15 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Wed, 8 Apr 2015 08:17:45 +0100 Subject: [PATCH] remove commented code --- Crypto/Cipher/Types/Block.hs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Crypto/Cipher/Types/Block.hs b/Crypto/Cipher/Types/Block.hs index 0dbe414..d79e07e 100644 --- a/Crypto/Cipher/Types/Block.hs +++ b/Crypto/Cipher/Types/Block.hs @@ -187,15 +187,6 @@ ivAdd (IV b) i = IV $ copy b if ofs == 0 then return hi else loop hi (ofs - 1) p -{- -ivAdd (IV b) i = IV $ snd $ B.mapAccumR addCarry i b - where addCarry :: Int -> Word8 -> (Int, Word8) - addCarry acc w - | acc == 0 = (0, w) - | otherwise = let (hi,lo) = acc `divMod` 256 - nw = lo + (fromIntegral w) - in (hi + (nw `shiftR` 8), fromIntegral nw) --} cbcEncryptGeneric :: (ByteArray ba, BlockCipher cipher) => cipher -> IV cipher -> ba -> ba cbcEncryptGeneric cipher ivini input = byteArrayConcat $ doEnc ivini $ chunk (blockSize cipher) input