aboutsummaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-10-01 22:32:44 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-10-01 22:32:44 -0400
commitbc64d3c693f83ec66b99d87c9e6be1f65553354b (patch)
tree7765bab31859543fc2a244b8596852868a19cdf6 /Backend
parent8aff1b11f2c6be205dccf1a30f422ee7ed5af4d2 (diff)
better name
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Hash.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index d9a1bbc97..9cef3cae1 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -129,15 +129,15 @@ hashFile hash file filesize = do
showAction "checksum"
liftIO $ go hash
where
- go (SHAHash hashsize) = case shaCommand hashsize filesize of
+ go (SHAHash hashsize) = case shaHasher hashsize filesize of
Left sha -> sha <$> L.readFile file
Right command ->
either error return
=<< externalSHA command hashsize file
go (SkeinHash hashsize) = skeinHasher hashsize <$> L.readFile file
-shaCommand :: HashSize -> Integer -> Either (L.ByteString -> String) String
-shaCommand hashsize filesize
+shaHasher :: HashSize -> Integer -> Either (L.ByteString -> String) String
+shaHasher hashsize filesize
| hashsize == 1 = use SysConfig.sha1 sha1
| hashsize == 256 = use SysConfig.sha256 sha256
| hashsize == 224 = use SysConfig.sha224 sha224