Support being built with crypton rather than cryptonite

crypton is a fork of cryptonite, and cryptonite's github repo has been
archived. Some deps are already using cryptonite so it's clearly the way
forward.

Added a build flag without a default, so cabal configure will select on its
own which to use. stack files pin to cryptonite for now.

Sponsored-by: Nicholas Golder-Manning on Patreon
This commit is contained in:
Joey Hess 2023-09-21 12:43:42 -04:00
parent e03e907705
commit 54da44d42a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 19 additions and 3 deletions

View file

@ -76,8 +76,8 @@ import qualified Data.ByteString.Lazy as L
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.IORef
import "cryptonite" Crypto.MAC.HMAC hiding (Context)
import "cryptonite" Crypto.Hash
import Crypto.MAC.HMAC hiding (Context)
import Crypto.Hash
sha1 :: L.ByteString -> Digest SHA1
sha1 = hashlazy