encryptByteString :: QC.Property
encryptByteString = QCM.monadicIO testStringEq
  where
    clearPw = BS.pack `liftM` (QC.arbitrary `QC.suchThat` ((>0) . length))
    testStringEq = QCM.forAllM clearPw $ \s -> do
      ePW  <- A.Encrypted `liftM` (QCM.run $ A.encrypt s)

      let cPW  = A.ClearText s
{-      ePW' <- QCM.run $ encryptPassword (ClearText s)
      QCM.assert $ (checkPassword cPW ePW
                    && checkPassword cPW cPW
                    && checkPassword ePW ePW') --TODO/NOTe: This fails.
                                                 Surpsising?
                                                 Encrypt twice and get two
                                                 different password hashes -}
      QCM.assert $ (A.checkPassword cPW ePW
                    && A.checkPassword cPW (A.ClearText s))


------------------------------------------------------------------------------
encryptByteString :: QC.Property
encryptByteString = QCM.monadicIO testStringEq
  where
    clearPw = BS.pack `liftM` (QC.arbitrary `QC.suchThat` ((>0) . length))
    testStringEq = QCM.forAllM clearPw $ \s -> do
      ePW  <- A.Encrypted `liftM` (QCM.run $ A.encrypt s)

      let cPW  = A.ClearText s
{-      ePW' <- QCM.run $ encryptPassword (ClearText s)
      QCM.assert $ (checkPassword cPW ePW
                    && checkPassword cPW cPW
                    && checkPassword ePW ePW') --TODO/NOTe: This fails.
                                                 Surpsising?
                                                 Encrypt twice and get two
                                                 different password hashes -}
      QCM.assert $ (A.checkPassword cPW ePW
                    && A.checkPassword cPW (A.ClearText s))


------------------------------------------------------------------------------
encryptByteString = QCM.monadicIO testStringEq
  where
    clearPw = BS.pack `liftM` (QC.arbitrary `QC.suchThat` ((>0) . length))
    testStringEq = QCM.forAllM clearPw $ \s -> do
      ePW  <- A.Encrypted `liftM` (QCM.run $ A.encrypt s)

      let cPW  = A.ClearText s
{-      ePW' <- QCM.run $ encryptPassword (ClearText s)
      QCM.assert $ (checkPassword cPW ePW
                    && checkPassword cPW cPW
                    && checkPassword ePW ePW') --TODO/NOTe: This fails.
                                                 Surpsising?
                                                 Encrypt twice and get two
                                                 different password hashes -}
      QCM.assert $ (A.checkPassword cPW ePW
                    && A.checkPassword cPW (A.ClearText s))


------------------------------------------------------------------------------