Removed dependency on haskell SHA library, instead using cryptohash >= 0.11.0.
This commit is contained in:
parent
be3895be45
commit
5f73bc3a12
7 changed files with 11 additions and 11 deletions
|
@ -39,7 +39,7 @@ import Git
|
|||
import qualified Data.Text as T
|
||||
#ifdef WITH_PAIRING
|
||||
import qualified Data.Text.Encoding as T
|
||||
import qualified Data.ByteString.Lazy as B
|
||||
import qualified Data.ByteString as B
|
||||
import Data.Char
|
||||
import qualified Control.Exception as E
|
||||
import Control.Concurrent
|
||||
|
@ -304,7 +304,7 @@ secretProblem s
|
|||
| otherwise = Nothing
|
||||
|
||||
toSecret :: Text -> Secret
|
||||
toSecret s = B.fromChunks [T.encodeUtf8 $ T.toLower $ T.filter isAlphaNum s]
|
||||
toSecret s = T.encodeUtf8 $ T.toLower $ T.filter isAlphaNum s
|
||||
|
||||
{- From Dickens -}
|
||||
sampleQuote :: Text
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
|
||||
module Utility.Verifiable where
|
||||
|
||||
import Data.Digest.Pure.SHA
|
||||
import Data.ByteString.Lazy.UTF8 (fromString)
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import Data.ByteString.UTF8 (fromString)
|
||||
import qualified Data.ByteString as S
|
||||
|
||||
type Secret = L.ByteString
|
||||
import Utility.Hash
|
||||
|
||||
type Secret = S.ByteString
|
||||
type HMACDigest = String
|
||||
|
||||
{- A value, verifiable using a HMAC digest and a secret. -}
|
||||
|
@ -28,7 +29,7 @@ verify :: (Eq a, Show a) => Verifiable a -> Secret -> Bool
|
|||
verify v secret = v == mkVerifiable (verifiableVal v) secret
|
||||
|
||||
calcDigest :: String -> Secret -> HMACDigest
|
||||
calcDigest v secret = showDigest $ hmacSha1 secret $ fromString v
|
||||
calcDigest v secret = calcMac HmacSha1 secret (fromString v)
|
||||
|
||||
{- for quickcheck -}
|
||||
prop_verifiable_sane :: String -> String -> Bool
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -23,6 +23,8 @@ git-annex (5.20150410) UNRELEASED; urgency=medium
|
|||
* fsck --from remote: Avoid downloading a key if it would go over
|
||||
the annex.diskreserve limit.
|
||||
* required: New command, like wanted, but for required content.
|
||||
* Removed dependency on haskell SHA library,
|
||||
instead using cryptohash >= 0.11.0.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Thu, 09 Apr 2015 20:59:43 -0400
|
||||
|
||||
|
|
1
debian/control
vendored
1
debian/control
vendored
|
@ -10,7 +10,6 @@ Build-Depends:
|
|||
libghc-data-default-dev,
|
||||
libghc-hslogger-dev,
|
||||
libghc-pcre-light-dev,
|
||||
libghc-sha-dev,
|
||||
libghc-cryptohash-dev (>= 0.11.0),
|
||||
libghc-dataenc-dev,
|
||||
libghc-utf8-string-dev,
|
||||
|
|
|
@ -105,7 +105,7 @@ Executable git-annex
|
|||
Main-Is: git-annex.hs
|
||||
Build-Depends: MissingH, hslogger, directory, filepath,
|
||||
containers (>= 0.5.0.0), utf8-string, mtl (>= 2),
|
||||
bytestring, old-locale, time, dataenc, SHA, process, json,
|
||||
bytestring, old-locale, time, dataenc, process, json,
|
||||
base (>= 4.5 && < 4.9), monad-control, exceptions (>= 0.6), transformers,
|
||||
IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance,
|
||||
SafeSemaphore, uuid, random, dlist, unix-compat, async, stm (>= 2.3),
|
||||
|
|
|
@ -6,7 +6,6 @@ constraints: Crypto ==4.2.5.1,
|
|||
MissingH ==1.2.1.0,
|
||||
MonadRandom ==0.1.13,
|
||||
QuickCheck ==2.7.6,
|
||||
SHA ==1.6.1,
|
||||
SafeSemaphore ==0.10.1,
|
||||
aeson ==0.7.0.6,
|
||||
ansi-terminal ==0.6.1.1,
|
||||
|
|
|
@ -6,7 +6,6 @@ constraints: Crypto ==4.2.5.1,
|
|||
MissingH ==1.2.1.0,
|
||||
MonadRandom ==0.1.13,
|
||||
QuickCheck ==2.7.6,
|
||||
SHA ==1.6.1,
|
||||
SafeSemaphore ==0.10.1,
|
||||
aeson ==0.7.0.6,
|
||||
ansi-terminal ==0.6.1.1,
|
||||
|
|
Loading…
Reference in a new issue