packages feed

sel 0.0.1.0 → 0.0.2.0

raw patch · 11 files changed

+24/−15 lines, 11 filesdep ~hedgehogdep ~libsodium-bindingsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: hedgehog, libsodium-bindings

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@ # CHANGELOG -## [Unreleased]+## sel-0.0.2.0++* Add usages of `secureMain` in examples+* Depends on libsodium-bindings-0.0.2.0
README.md view
@@ -1,4 +1,4 @@-# sel [![CI](https://github.com/haskell-cryptography/libsodium-bindings/actions/workflows/sel.yml/badge.svg)](https://github.com/haskell-cryptography/libsodium-bindings/actions/workflows/sel.yml) [![made with Haskell](https://img.shields.io/badge/Made%20in-Haskell-%235e5086?logo=haskell&style=flat-square)](https://haskell.org)+# sel [![CI](https://github.com/haskell-cryptography/libsodium-bindings/actions/workflows/ci.yaml/badge.svg)](https://github.com/haskell-cryptography/libsodium-bindings/actions/workflows/ci.yaml) [![made with Haskell](https://img.shields.io/badge/Made%20in-Haskell-%235e5086?logo=haskell&style=flat-square)](https://haskell.org)   Sel is the library for casual users by the [Haskell Cryptography Group](https://haskell-cryptography.org).
sel.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               sel-version:            0.0.1.0+version:            0.0.2.0 category:           Cryptography synopsis:           Cryptography for the casual user description:@@ -15,7 +15,7 @@ license:            BSD-3-Clause build-type:         Simple tested-with:-  GHC ==8.10.7 || ==9.0.2 || ==9.2.8 || ==9.4.7 || ==9.6.2+  GHC ==9.2.8 || ==9.4.8 || ==9.6.6 || ==9.8.2 || ==9.10.1  extra-source-files:   LICENSE@@ -67,7 +67,7 @@     , base                >=4.14     && <5     , base16              ^>=1.0     , bytestring          >=0.10     && <0.13-    , libsodium-bindings  ^>=0.0.1.1+    , libsodium-bindings  ^>=0.0.2     , text                >=1.2      && <2.2     , text-display        ^>=0.0 
src/Sel/HMAC/SHA256.hs view
@@ -95,8 +95,9 @@ -- $usage -- -- > import Sel.HMAC.SHA256 qualified as HMAC+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- The parties agree on a shared secret key -- >   authKey <- HMAC.newAuthenticationKey -- >   -- An authentication tag is computed for the message by the server
src/Sel/HMAC/SHA512.hs view
@@ -95,8 +95,9 @@ -- $usage -- -- > import Sel.HMAC.SHA512 qualified as HMAC+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- The parties agree on a shared secret key -- >   authKey <- HMAC.newAuthenticationKey -- >   -- An authentication tag is computed for the message by the server
src/Sel/HMAC/SHA512_256.hs view
@@ -93,8 +93,9 @@ -- $usage -- -- > import Sel.HMAC.SHA512_256 qualified as HMAC+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- The parties agree on a shared secret key -- >   authKey <- HMAC.newAuthenticationKey -- >   -- An authentication tag is computed for the message by the server
src/Sel/PublicKey/Cipher.hs view
@@ -89,8 +89,9 @@ -- $usage -- -- > import qualified Sel.PublicKey.Cipher as Cipher+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- We get the sender their pair of keys: -- >   (senderSecretKey, senderPublicKey) <- newKeyPair -- >   -- We get the nonce from the other party with the message, or with 'encrypt' and our own message.
src/Sel/PublicKey/Seal.hs view
@@ -62,8 +62,9 @@ -- $usage -- -- > import qualified Sel.PublicKey.Seal as Seal+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- We get the recipient their pair of keys: -- > (recipientPublicKey, recipientSecretKey) <- newKeyPair -- >   encryptedMessage <- Seal.encrypt "hello hello" recipientPublicKey
src/Sel/SecretKey/Authentication.hs view
@@ -70,8 +70,9 @@ -- $usage -- -- > import Sel.SecretKey.Authentication qualified as Auth+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- The parties agree on a shared secret key -- >   authKey <- Auth.newAuthenticationKey -- >   -- An authentication tag is computed for the message by the server
src/Sel/SecretKey/Cipher.hs view
@@ -83,8 +83,9 @@ -- $usage -- -- > import qualified Sel.SecretKey.Cipher as Cipher+-- > import Sel (secureMain) -- >--- > main = do+-- > main = secureMain $ do -- >   -- We get the secretKey from the other party or with 'newSecretKey'. -- >   -- We get the nonce from the other party with the message, or with 'encrypt' and our own message. -- >   -- Do not reuse a nonce with the same secret key!
test/Main.hs view
@@ -2,7 +2,7 @@  import Test.Tasty -import LibSodium.Bindings.Main (sodiumInit)+import Sel (secureMain) import qualified Test.HMAC as HMAC import qualified Test.Hashing as Hashing import qualified Test.Hashing.Password as Password@@ -17,8 +17,7 @@ import qualified Test.SecretKey.Stream as SecretKey.Stream  main :: IO ()-main = do-  sodiumInit+main = secureMain $ do   defaultMain . testGroup "sel tests" $ specs  specs :: [TestTree]