diff options
author | Joey Hess <joeyh@joeyh.name> | 2019-01-16 16:33:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2019-01-16 16:33:08 -0400 |
commit | c3afb3434d61fa71330351e839d2dbe47c9748cf (patch) | |
tree | 9e2d3be9fbcb6a5a66f8543f2ae76f0a7e061fca /Backend | |
parent | 96aba8eff7597898f53bfbab5865ff30a927d355 (diff) |
remove recently added cache from KeyVariety
Adding that field broke the Read/Show serialization back-compat,
and also the Eq and Ord instances were not blinded to it, which broke
git annex fsck and probably more.
I think that the new approach used in formatKeyVariety will be nearly
as fast, but have not benchmarked it.
Diffstat (limited to 'Backend')
-rw-r--r-- | Backend/Hash.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Backend/Hash.hs b/Backend/Hash.hs index b8977301b3..abf52ab3ed 100644 --- a/Backend/Hash.hs +++ b/Backend/Hash.hs @@ -74,15 +74,15 @@ genBackendE hash = (genBackend hash) } hashKeyVariety :: Hash -> HasExt -> KeyVariety -hashKeyVariety MD5Hash he = MD5Key he mempty -hashKeyVariety SHA1Hash he = SHA1Key he mempty -hashKeyVariety (SHA2Hash size) he = SHA2Key size he mempty -hashKeyVariety (SHA3Hash size) he = SHA3Key size he mempty -hashKeyVariety (SkeinHash size) he = SKEINKey size he mempty +hashKeyVariety MD5Hash he = MD5Key he +hashKeyVariety SHA1Hash he = SHA1Key he +hashKeyVariety (SHA2Hash size) he = SHA2Key size he +hashKeyVariety (SHA3Hash size) he = SHA3Key size he +hashKeyVariety (SkeinHash size) he = SKEINKey size he #if MIN_VERSION_cryptonite(0,23,0) -hashKeyVariety (Blake2bHash size) he = Blake2bKey size he mempty -hashKeyVariety (Blake2sHash size) he = Blake2sKey size he mempty -hashKeyVariety (Blake2spHash size) he = Blake2spKey size he mempty +hashKeyVariety (Blake2bHash size) he = Blake2bKey size he +hashKeyVariety (Blake2sHash size) he = Blake2sKey size he +hashKeyVariety (Blake2spHash size) he = Blake2spKey size he #endif {- A key is a hash of its contents. -} |