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.
This commit is contained in:
parent
96aba8eff7
commit
c3afb3434d
3 changed files with 112 additions and 111 deletions
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue