Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use crypton instead of cryptonite #40

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clientsession.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ library
, skein == 1.0.*
, base64-bytestring >= 0.1.1.1
, entropy >= 0.2.1
, cryptonite >= 0.15
, crypton >= 1.0
, setenv
exposed-modules: Web.ClientSession
other-modules: System.LookupEnv
Expand Down
6 changes: 3 additions & 3 deletions src/Web/ClientSession.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ import Data.Tagged (Tagged, untag)
-- from crypto-api
import Crypto.Classes (constTimeEq)

-- from cryptonite
-- from crypton
import qualified Crypto.Cipher.AES as A
import Crypto.Cipher.Types(Cipher(..),BlockCipher(..),makeIV)
import Crypto.Error (eitherCryptoError)
import "cryptonite" Crypto.Random (ChaChaDRG,drgNew,randomBytesGenerate)
import "crypton" Crypto.Random (ChaChaDRG,drgNew,randomBytesGenerate)

-- from skein
import Crypto.Skein (skeinMAC', Skein_512_256)
Expand Down Expand Up @@ -311,7 +311,7 @@ decrypt key dataBS64 = do
-- Crypto.Modes.getIVIO, since it does not require /dev/urandom
-- I/O for every call.

-- [now with cryptonite.ChaChaDRG]
-- [now with crypton.ChaChaDRG]
-- I haven't run any benchmark; this conversion is a case of “code
-- that doesn't crash trumps performance.”

Expand Down