crypto-multihash 0.4.0.0 → 0.4.1.0
raw patch · 4 files changed
+10/−11 lines, 4 files
Files
- README.md +5/−6
- crypto-multihash.cabal +1/−1
- src/Crypto/Multihash.hs +2/−2
- src/Crypto/Multihash/Weak.hs +2/−2
README.md view
@@ -43,24 +43,23 @@ let h = encode' Base58 m :: ByteString -- You can check that a multihash corresponds to some data `v`- -- but you need to wrap the data in the newtype `Payload`- checkPayload h (Payload v)+ checkMultihash h v -- Right True-+ -- Or if you have a Multihash to compare you can use it check h m -- Right True -- There is also an unsafe version, as for encode -- note that sometimes you will need to specify the string types- checkPayload' ("whatever"::String) (Payload v)+ checkMultihash' ("whatever"::String) v -- *** Exception: Unable to infer an encoding- checkPayload' ("Eiwhatever"::ByteString) (Payload v)+ checkMultihash' ("Eiwhatever"::ByteString) v -- *** Exception: base64: input: invalid length check' ("EiCfhtCBiEx9ZZov6qDFWtAVo79PGysLgizRXWwVsPA1CA=="::ByteString) m -- False - checkPayload' h (Payload v)+ checkMultihash' h v -- True check' h m -- True
crypto-multihash.cabal view
@@ -1,5 +1,5 @@ name: crypto-multihash-version: 0.4.0.0+version: 0.4.1.0 synopsis: Multihash library on top of cryptonite crypto library description: Multihash is a protocol for encoding the hash algorithm and digest length at the start of the digest, see the official
src/Crypto/Multihash.hs view
@@ -30,8 +30,8 @@ , Base (..) , Codable (..) , Encodable (..)- , Checkable (..)- , Payload (..)+ --, Checkable (..)+ --, Payload (..) -- * Multihash helpers , multihash , multihashlazy
src/Crypto/Multihash/Weak.hs view
@@ -34,8 +34,8 @@ WeakMultihashDigest , Base (..) , Encodable (..)- , Checkable (..)- , Payload (..)+ --, Checkable (..)+ --, Payload (..) -- * Weak Multihash Helpers , weakMultihash , weakMultihash'