From 02533b43a7422c63935d51dee5e4f22b9d18bca6 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Fri, 10 Apr 2015 07:23:31 +0100 Subject: [PATCH] simplify boolean operation --- Crypto/Cipher/DES/Primitive.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Crypto/Cipher/DES/Primitive.hs b/Crypto/Cipher/DES/Primitive.hs index 96a5aaf..690a156 100644 --- a/Crypto/Cipher/DES/Primitive.hs +++ b/Crypto/Cipher/DES/Primitive.hs @@ -29,7 +29,7 @@ type Bits56 = [Bool] type Bits64 = [Bool] desXor :: [Bool] -> [Bool] -> [Bool] -desXor a b = zipWith (\x y -> (not x && y) || (x && not y)) a b +desXor a b = zipWith xor a b desRotate :: [Bool] -> Int -> [Bool] desRotate bits rot = drop rot' bits ++ take rot' bits