| Copyright | 2018 Monadic GmbH |
|---|---|
| License | BSD3 |
| Maintainer | kim@monadic.xyz, team@monadic.xyz |
| Stability | provisional |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Multihash.Internal
Description
Synopsis
- data HashAlgorithm
- type Multihashable a = (HashAlgorithm a, FromCryptonite a)
- getMultihashedDigest :: forall a. Multihashable a => Get (Digest a)
- getHashAlgorithm :: Get HashAlgorithm
- getLength :: Get Int
- toCode :: HashAlgorithm -> Word16
- fromCode :: Word16 -> Maybe HashAlgorithm
- fromCryptonite :: FromCryptonite a => proxy a -> HashAlgorithm
- digestSize :: HashAlgorithm -> Int
- _3 :: (a, b, c) -> c
Documentation
data HashAlgorithm Source #
HashAlgorithms for which we know a multihash code.
Note that this currently excludes variable output-length algorithms.
Constructors
Instances
| Bounded HashAlgorithm Source # | |
Defined in Data.Multihash.Internal | |
| Enum HashAlgorithm Source # | |
Defined in Data.Multihash.Internal Methods succ :: HashAlgorithm -> HashAlgorithm # pred :: HashAlgorithm -> HashAlgorithm # toEnum :: Int -> HashAlgorithm # fromEnum :: HashAlgorithm -> Int # enumFrom :: HashAlgorithm -> [HashAlgorithm] # enumFromThen :: HashAlgorithm -> HashAlgorithm -> [HashAlgorithm] # enumFromTo :: HashAlgorithm -> HashAlgorithm -> [HashAlgorithm] # enumFromThenTo :: HashAlgorithm -> HashAlgorithm -> HashAlgorithm -> [HashAlgorithm] # | |
| Eq HashAlgorithm Source # | |
Defined in Data.Multihash.Internal Methods (==) :: HashAlgorithm -> HashAlgorithm -> Bool # (/=) :: HashAlgorithm -> HashAlgorithm -> Bool # | |
type Multihashable a = (HashAlgorithm a, FromCryptonite a) Source #
getMultihashedDigest :: forall a. Multihashable a => Get (Digest a) Source #
toCode :: HashAlgorithm -> Word16 Source #
fromCryptonite :: FromCryptonite a => proxy a -> HashAlgorithm Source #
digestSize :: HashAlgorithm -> Int Source #