nettle 0.3.0 → 0.3.1
raw patch · 6 files changed
+17/−16 lines, 6 filesdep ~basedep ~bytestringnew-uploader
Dependency ranges changed: base, bytestring
Files
- nettle.cabal +9/−8
- src/Crypto/Nettle/Ciphers.hs +2/−2
- src/Tests/Ciphers.hs +2/−2
- src/Tests/HexUtils.hs +2/−2
- src/Tests/VectorsHMAC.hs +1/−1
- src/Tests/VectorsHash.hs +1/−1
nettle.cabal view
@@ -1,5 +1,6 @@+Cabal-Version: 3.4 Name: nettle-Version: 0.3.0+Version: 0.3.1 Synopsis: safe nettle binding Description: safe binding for the nettle (<http://www.lysator.liu.se/~nisse/nettle/nettle.html>) library.@@ -8,17 +9,17 @@ License-file: COPYING Copyright: Stefan Bühler <stbuehler@web.de> Author: Stefan Bühler <stbuehler@web.de>-Maintainer: Stefan Bühler <stbuehler@web.de>+Maintainer: Clint Adams <clint@debian.org> Category: Cryptography Build-Type: Simple Homepage: https://github.com/stbuehler/haskell-nettle Bug-reports: https://github.com/stbuehler/haskell-nettle/issues-Cabal-Version: >=1.8 Extra-source-files: README.md , src/nettle-ciphers.h , src/nettle-hash.h , src/Tests/*.hs , src/Tests/KAT/*.hs+Tested-With: GHC ==9.8.1 || ==9.6.4 || ==9.4.8 || ==9.2.8 || ==9.0.2 || ==8.10.7 || ==8.8.4 Flag UsePkgConfig Description: Use pkg-config to check for library dependences@@ -27,7 +28,7 @@ Library hs-source-dirs: src Build-Depends: base >= 4 && < 5- , bytestring >= 0.10.8 && < 0.11+ , bytestring >= 0.10.8 && < 0.13 , byteable >= 0.1.1 && < 0.2 , tagged >= 0.8.5 && < 0.9 , securemem >= 0.1.9 && < 0.2@@ -57,7 +58,7 @@ hs-source-dirs: src/Tests Main-Is: Ciphers.hs Build-depends: base >= 4 && < 5- , bytestring >= 0.10.8 && < 0.11+ , bytestring >= 0.10.8 && < 0.13 , QuickCheck >= 2 && < 3 , array >= 0.5.1 && < 0.6 , test-framework >= 0.3.3 && > 0.4@@ -72,7 +73,7 @@ hs-source-dirs: src/Tests Main-Is: Hash.hs Build-depends: base >= 4 && < 5- , bytestring >= 0.10.8 && < 0.11+ , bytestring >= 0.10.8 && < 0.13 , tagged >= 0.8.5 && < 0.9 , array >= 0.5.1 && < 0.6 , test-framework >= 0.3.3 && > 0.4@@ -86,7 +87,7 @@ hs-source-dirs: src/Tests Main-Is: HMAC.hs Build-depends: base >= 4 && < 5- , bytestring >= 0.10.8 && < 0.11+ , bytestring >= 0.10.8 && < 0.13 , tagged >= 0.8.5 && < 0.9 , array >= 0.5.1 && < 0.6 , test-framework >= 0.3.3 && > 0.4@@ -100,7 +101,7 @@ hs-source-dirs: src/Tests Main-Is: UMAC.hs Build-depends: base >= 4 && < 5- , bytestring >= 0.10.8 && < 0.11+ , bytestring >= 0.10.8 && < 0.13 , tagged >= 0.8.5 && < 0.9 , array >= 0.5.1 && < 0.6 , test-framework >= 0.3.3 && > 0.4
src/Crypto/Nettle/Ciphers.hs view
@@ -533,7 +533,7 @@ -- check nonce length wrap_chacha_set_nonce :: Ptr Word8 -> Word -> Ptr Word8 -> IO ()-wrap_chacha_set_nonce ctxptr ivlen ivptr = if ivlen == 8 then c_chacha_set_nonce ctxptr ivptr else fail "Invalid nonce length"+wrap_chacha_set_nonce ctxptr ivlen ivptr = if ivlen == 8 then c_chacha_set_nonce ctxptr ivptr else error "Invalid nonce length" {-| 'CHACHA' is a variant of the 'SALSA20' stream cipher, both designed by D. J. Bernstein.@@ -576,7 +576,7 @@ -- check nonce length wrap_salsa20_set_nonce :: Ptr Word8 -> Word -> Ptr Word8 -> IO ()-wrap_salsa20_set_nonce ctxptr ivlen ivptr = if ivlen == 8 then c_salsa20_set_nonce ctxptr ivptr else fail "Invalid nonce length"+wrap_salsa20_set_nonce ctxptr ivlen ivptr = if ivlen == 8 then c_salsa20_set_nonce ctxptr ivptr else error "Invalid nonce length" {-| 'SALSA20' is a fairly recent stream cipher designed by D. J. Bernstein.
src/Tests/Ciphers.hs view
@@ -23,11 +23,11 @@ genByteString len = liftM B.pack $ vectorOf len (choose (0,255)) runEither :: (Monad m, Show e) => Either e x -> m x-runEither (Left e) = fail $ show e+runEither (Left e) = error $ show e runEither (Right x) = return x runMaybe :: (Monad m) => Maybe x -> m x-runMaybe Nothing = fail "got nothing"+runMaybe Nothing = error "got nothing" runMaybe (Just x) = return x genKey' :: KeySizeSpecifier -> Gen B.ByteString
src/Tests/HexUtils.hs view
@@ -26,10 +26,10 @@ readHex' (a:b:xs) = do n <- case N.readHex [a,b] of (n, ""):_ -> return n- _ -> fail "invalid hex encoding"+ _ -> error "invalid hex encoding" xn <- readHex' xs return $ n:xn-readHex' _ = fail "invalid hex encoding"+readHex' _ = error "invalid hex encoding" readHex :: String -> [Word8] readHex s = let Just r = readHex' s in r
src/Tests/VectorsHMAC.hs view
@@ -171,5 +171,5 @@ findHmacTestVectors :: Monad m => String -> m [(B.ByteString, B.ByteString, String)] findHmacTestVectors key = case filter ((key == ) . fst) hmacTestVectors of- [] -> fail $ "unknown HMAC: " ++ key+ [] -> error $ "unknown HMAC: " ++ key l -> return $ concatMap snd l
src/Tests/VectorsHash.hs view
@@ -1199,5 +1199,5 @@ findHashTestVectors :: Monad m => String -> m [(B.ByteString, String)] findHashTestVectors key = case filter ((key == ) . fst) hashTestVectors of- [] -> fail $ "unknown Hash: " ++ key+ [] -> error $ "unknown Hash: " ++ key l -> return $ concatMap snd l