[Haskell-cafe] [ANN] crypto-api-tests

Thomas DuBuisson thomas.dubuisson at gmail.com
Wed Sep 28 00:54:36 CEST 2011

The crypto-api test modules have been split out into their own
package, crypto-api-tests.  Additionally, the tests now use the
test-framework package.  This should make it much easier for
hash/cipher maintainers to integrate into their existing testing
infrastructure.  For example:

$ cabal update ; cabal install cryptocipher crypto-api crypto-api-tests

    import Test.Framework
    import Test.AES (makeAESTests)
    import Crypto.Cipher.AES (AES128)

    main = do
      ts <- makeAESTests (a :: AES128)
      defaultMain ts
{- END CODE -}

$ ghc test.hs ; ./test
OFBVarTxt128d.txt-125: [OK]
OFBVarTxt128d.txt-126: [OK]
OFBVarTxt128d.txt-127: [OK]
Block Cipher tests (ident):
  ECBEncDecID: [OK, passed 100 tests]
  CBCEncDecID: [OK, passed 100 tests]
  CFBEncDecID: [OK, passed 100 tests]
  OFBEncDecID: [OK, passed 100 tests]
  CTREncDecID: [OK, passed 100 tests]
Block Cipher tests (lazy/string bytestring equality):
  ECBStringLazyEq: [OK, passed 100 tests]
  CBCStrictLazyEq: [OK, passed 100 tests]
  CFBStrictLazyEq: [OK, passed 100 tests]
  OFBStrictLazyEq: [OK, passed 100 tests]
  CTRStrictLazyEq: [OK, passed 100 tests]

         Properties   Test Cases     Total
 Passed  10           2272           2282
 Failed  0            0              0
 Total   10           2272           2282

Patches for more algorithms and/or property tests for classes of
algorithms are certainly welcome.


More information about the Haskell-Cafe mailing list