From 65780e38cbeddd9f4b377d393ee7b879360f6e9b Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Wed, 8 Apr 2015 20:41:06 +0100 Subject: [PATCH] remove unnecessary cast in DES --- Crypto/Cipher/DES/Serialization.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Crypto/Cipher/DES/Serialization.hs b/Crypto/Cipher/DES/Serialization.hs index 07c73fd..2b8f393 100644 --- a/Crypto/Cipher/DES/Serialization.hs +++ b/Crypto/Cipher/DES/Serialization.hs @@ -86,7 +86,7 @@ unblockify blocks = byteArrayAllocAndFreeze (nbBlocks * 8) $ \initPtr -> pokeTo pokeTo ptr (Block x:xs) = poke ptr (toBE64 x) >> pokeTo (ptr `plusPtr` 8) xs toBS :: Block -> B.ByteString -toBS (Block w) = byteArrayAllocAndFreeze 8 $ \ptr -> poke (castPtr ptr) (toBE64 w) +toBS (Block w) = byteArrayAllocAndFreeze 8 $ \ptr -> poke ptr (toBE64 w) {- blockify s | B.null s = [] | otherwise = let (s1,s2) = B.splitAt 8 s