Removed support for building with the old cryptohash library.
Building with that library made git-annex not support SHA3; it's time for that to always be supported in case SHA2 dominoes.
This commit is contained in:
parent
622b3fface
commit
40327cab6e
5 changed files with 5 additions and 29 deletions
|
@ -5,8 +5,6 @@
|
|||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Backend.Hash (
|
||||
backends,
|
||||
testKeyBackend,
|
||||
|
@ -36,9 +34,7 @@ data Hash
|
|||
hashes :: [Hash]
|
||||
hashes = concat
|
||||
[ map (SHA2Hash . HashSize) [256, 512, 224, 384]
|
||||
#ifdef WITH_CRYPTONITE
|
||||
, map (SHA3Hash . HashSize) [256, 512, 224, 384]
|
||||
#endif
|
||||
, map (SkeinHash . HashSize) [256, 512]
|
||||
, [SHA1Hash]
|
||||
, [MD5Hash]
|
||||
|
@ -212,12 +208,10 @@ shaHasher (HashSize hashsize) filesize
|
|||
|
||||
sha3Hasher :: HashSize -> (L.ByteString -> String)
|
||||
sha3Hasher (HashSize hashsize)
|
||||
#ifdef WITH_CRYPTONITE
|
||||
| hashsize == 256 = show . sha3_256
|
||||
| hashsize == 224 = show . sha3_224
|
||||
| hashsize == 384 = show . sha3_384
|
||||
| hashsize == 512 = show . sha3_512
|
||||
#endif
|
||||
| otherwise = error $ "unsupported SHA3 size " ++ show hashsize
|
||||
|
||||
skeinHasher :: HashSize -> (L.ByteString -> String)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue