From d67a21f95fb6446638e8fbf1c0af8e50bf480b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Ch=C3=A9ron?= Date: Thu, 7 Mar 2019 21:35:04 +0100 Subject: [PATCH] Remove unnecessary imports and calls --- Crypto/Cipher/Blowfish/Primitive.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Crypto/Cipher/Blowfish/Primitive.hs b/Crypto/Cipher/Blowfish/Primitive.hs index 705a41e..b3708cd 100644 --- a/Crypto/Cipher/Blowfish/Primitive.hs +++ b/Crypto/Cipher/Blowfish/Primitive.hs @@ -31,12 +31,11 @@ import Data.Word import Crypto.Cipher.Blowfish.Box import Crypto.Error -import Crypto.Internal.ByteArray (ByteArray, ByteArrayAccess, Bytes) +import Crypto.Internal.ByteArray (ByteArray, ByteArrayAccess) import qualified Crypto.Internal.ByteArray as B import Crypto.Internal.Compat import Crypto.Internal.Imports import Crypto.Internal.WordArray -import Crypto.Internal.Words newtype Context = Context Array32 @@ -179,8 +178,8 @@ cipherBlock (Context ar) inverse input = doRound input 0 s2 i = arrayRead32 ar (fromIntegral i + 530) s3 i = arrayRead32 ar (fromIntegral i + 786) p :: Int -> Word32 - p i | inverse = arrayRead32 ar (17 - fromIntegral i) - | otherwise = arrayRead32 ar (fromIntegral i) + p i | inverse = arrayRead32 ar (17 - i) + | otherwise = arrayRead32 ar i -- | Blowfish encrypt a Word using the current state of the key schedule cipherBlockMutable :: KeySchedule -> Word64 -> IO Word64