pureMD5 2.1.0.0 → 2.1.0.1
raw patch · 2 files changed
+7/−11 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/Digest/Pure/MD5.hs +4/−4
- pureMD5.cabal +3/−7
Data/Digest/Pure/MD5.hs view
@@ -64,12 +64,12 @@ blockSizeBits = (fromIntegral md5BlockSize) :: Word64 -- | The type for intermediate results (from md5Update)-data MD5Partial = MD5Par !Word32 !Word32 !Word32 !Word32+data MD5Partial = MD5Par {-# UNPACK #-} !Word32 {-# UNPACK #-} !Word32 {-# UNPACK #-} !Word32 {-# UNPACK #-} !Word32 deriving (Ord, Eq) -- | The type for final results.-data MD5Context = MD5Ctx { mdPartial :: !MD5Partial,- mdTotalLen :: !Word64 }+data MD5Context = MD5Ctx { mdPartial :: {-# UNPACK #-} !MD5Partial,+ mdTotalLen :: {-# UNPACK #-} !Word64 } -- |After finalizing a context, using md5Finalize, a new type -- is returned to prevent 're-finalizing' the structure.@@ -238,7 +238,7 @@ {-# INLINE (!!) #-} {-# INLINE applyMD5Rounds #-} -#ifdef LittleEndian+#ifdef FastWordExtract getNthWord n b = inlinePerformIO (unsafeUseAsCString b (flip peekElemOff n . castPtr)) #else getNthWord :: Int -> B.ByteString -> Word32
pureMD5.cabal view
@@ -1,5 +1,5 @@ name: pureMD5-version: 2.1.0.0+version: 2.1.0.1 license: BSD3 license-file: LICENSE author: Thomas DuBuisson <thomas.dubuisson@gmail.com>@@ -14,10 +14,6 @@ tested-with: GHC == 6.12.1 extra-source-files: Test/MD5.hs Test/md5test.hs -flag LittleEndian- description: Set to true if the architecture is little endian (uses native Word32 loads instead of bytes + shifts, overall 40% speed-up)- default: False- flag test description: Build a test program default: False@@ -27,8 +23,8 @@ ghc-options: -O2 -funfolding-use-threshold66 -funfolding-creation-threshold66 -fexcess-precision -funbox-strict-fields hs-source-dirs: exposed-modules: Data.Digest.Pure.MD5- if flag(LittleEndian)- cpp-options: -DLittleEndian+ if arch(i386) || arch(x86_64)+ cpp-options: -DFastWordExtract Executable md5Test main-is: Test/main.hs