afis 0.1.0 → 0.1.1
raw patch · 2 files changed
+4/−27 lines, 2 filesdep −bytedumpPVP ok
version bump matches the API change (PVP)
Dependencies removed: bytedump
API changes (from Hackage documentation)
Files
- afis.cabal +1/−9
- tests/Tests.hs +3/−18
afis.cabal view
@@ -1,5 +1,5 @@ Name: afis-Version: 0.1.0+Version: 0.1.1 Synopsis: Anti-forensic Information Splitter Description: Anti-forensic Information Splitter as defined for LUKS License: BSD3@@ -21,15 +21,8 @@ , crypto-random-api , packer , byteable- , bytedump Exposed-modules: Crypto.Data.AFIS ---Executable afis--- Main-Is: afis.hs--- ghc-options: -Wall -fno-warn-missing-signatures--- Hs-Source-Dirs: .--- Build-depends: base >= 4 && < 5- Test-Suite test-afis type: exitcode-stdio-1.0 hs-source-dirs: tests@@ -45,7 +38,6 @@ , crypto-random-api , cryptohash , bytestring- , bytedump ghc-options: -Wall -fno-warn-orphans -fno-warn-missing-signatures source-repository head
tests/Tests.hs view
@@ -5,22 +5,18 @@ import Control.Applicative import Control.Monad -import Test.Framework (Test, defaultMain, testGroup)+import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.Framework.Providers.HUnit (testCase)-import Test.HUnit +import Test.HUnit import Test.QuickCheck-import Test.QuickCheck.Test-import Test.Framework.Providers.QuickCheck2 (testProperty) import qualified Crypto.Data.AFIS as AFIS import Crypto.Hash import Crypto.Random.API import qualified Data.ByteString as B -import Text.Bytedump- mergeVec = [ (3 , hash :: HashFunctionBS SHA1@@ -34,7 +30,7 @@ ) ] -mergeKATs = map toProp $ zip mergeVec [0..]+mergeKATs = map toProp $ zip mergeVec [(0 :: Int)..] where toProp ((nbExpands, hashF, expected, dat), i) = testCase ("merge " ++ show i) (expected @=? AFIS.merge hashF nbExpands dat) @@ -67,14 +63,3 @@ | otherwise = True main = defaultMain tests-{-- let hf = hash :: HashFunctionBS SHA1- e = 4- bs = B.pack [1,2,3,4,5,1,2]- (z,_) = AFIS.split hf (FakeRNG 0 $ B.replicate 4000 3) e bs- bs2 = AFIS.merge hf e z- when (bs /= bs2) $ do- putStrLn ("bs : " ++ dumpRawBS bs)- putStrLn ("z : " ++ dumpRawBS z)- putStrLn ("bs2: " ++ dumpRawBS bs2)--}