summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredoDiNapoli <>2021-04-07 13:05:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2021-04-07 13:05:00 (GMT)
commite0c30a7ff56675c1e29f2824a48d1b7ba4697654 (patch)
treeb27c71cc53d86e78a718e8d2a0163ddd1fcd68d3
parent0d7a4784489f9de07fe26ed737b388d38a221a56 (diff)
version 0.3.0.2HEAD0.3.0.2master
-rw-r--r--rncryptor.cabal4
-rw-r--r--src/Crypto/RNCryptor/V3/Decrypt.hs4
-rw-r--r--test/PasswordBasedVectors.hs2
3 files changed, 5 insertions, 5 deletions
diff --git a/rncryptor.cabal b/rncryptor.cabal
index 23d748d..55d00c2 100644
--- a/rncryptor.cabal
+++ b/rncryptor.cabal
@@ -1,5 +1,5 @@
name: rncryptor
-version: 0.3.0.1
+version: 0.3.0.2
synopsis: Haskell implementation of the RNCryptor file format
description: Pure Haskell implementation of the RNCrytor spec.
license: MIT
@@ -67,7 +67,7 @@ test-suite rncryptor-tests
, tasty-quickcheck
, tasty-hunit
, io-streams
- , base16-bytestring
+ , base16-bytestring >= 1.0.0.0
, cryptonite
, text
, bytestring-arbitrary >= 0.1.0
diff --git a/src/Crypto/RNCryptor/V3/Decrypt.hs b/src/Crypto/RNCryptor/V3/Decrypt.hs
index d9f6fe6..946b765 100644
--- a/src/Crypto/RNCryptor/V3/Decrypt.hs
+++ b/src/Crypto/RNCryptor/V3/Decrypt.hs
@@ -53,7 +53,7 @@ parseSingleWord8 err = do
put vs
case B.unpack v of
[x] -> return x
- _ -> fail err
+ _ -> error err
--------------------------------------------------------------------------------
parseBSOfSize :: Int -> String -> State ByteString ByteString
@@ -62,7 +62,7 @@ parseBSOfSize sz err = do
let (v,vs) = B.splitAt sz bs
put vs
case B.unpack v of
- [] -> fail err
+ [] -> error err
_ -> return v
--------------------------------------------------------------------------------
diff --git a/test/PasswordBasedVectors.hs b/test/PasswordBasedVectors.hs
index 80f07e6..e345080 100644
--- a/test/PasswordBasedVectors.hs
+++ b/test/PasswordBasedVectors.hs
@@ -27,7 +27,7 @@ data TestVector = TestVector {
--------------------------------------------------------------------------------
unhex :: ByteString -> ByteString
-unhex = fst . decode
+unhex = decodeLenient
--------------------------------------------------------------------------------
withTestVector :: TestVector -> Assertion