Safe Haskell | None |
---|---|
Language | Haskell2010 |
Crypto.Multihash
- data MultihashDigest a
- data Base
- class Codable a where
- class HashAlgorithm a where
- hashBlockSize :: a -> Int
- hashDigestSize :: a -> Int
- hashInternalContextSize :: a -> Int
- hashInternalInit :: Ptr (Context a) -> IO ()
- hashInternalUpdate :: Ptr (Context a) -> Ptr Word8 -> Word32 -> IO ()
- hashInternalFinalize :: Ptr (Context a) -> Ptr (Digest a) -> IO ()
- data SHA1 :: * = SHA1
- data SHA256 :: * = SHA256
- data SHA512 :: * = SHA512
- data SHA3_512 :: * = SHA3_512
- data SHA3_384 :: * = SHA3_384
- data SHA3_256 :: * = SHA3_256
- data SHA3_224 :: * = SHA3_224
- data Blake2b_512 :: * = Blake2b_512
- data Blake2s_256 :: * = Blake2s_256
- encode :: (HashAlgorithm a, Codable a, Show a) => Base -> MultihashDigest a -> String
- multihash :: (HashAlgorithm a, Codable a, ByteArrayAccess bs) => a -> bs -> MultihashDigest a
- multihashlazy :: (HashAlgorithm a, Codable a) => a -> ByteString -> MultihashDigest a
Documentation
data MultihashDigest a Source #
Multihash Digest container
Instances
Show (MultihashDigest a) Source # | |
class HashAlgorithm a where #
Class representing hashing algorithms.
The interface presented here is update in place and lowlevel. the Hash module takes care of hidding the mutable interface properly.
SHA1 cryptographic hash algorithm
Constructors
SHA1 |
SHA256 cryptographic hash algorithm
Constructors
SHA256 |
SHA512 cryptographic hash algorithm
Constructors
SHA512 |
SHA3 (512 bits) cryptographic hash algorithm
Constructors
SHA3_512 |
SHA3 (384 bits) cryptographic hash algorithm
Constructors
SHA3_384 |
SHA3 (256 bits) cryptographic hash algorithm
Constructors
SHA3_256 |
SHA3 (224 bits) cryptographic hash algorithm
Constructors
SHA3_224 |
data Blake2b_512 :: * #
Blake2b (512 bits) cryptographic hash algorithm
Constructors
Blake2b_512 |
Instances
data Blake2s_256 :: * #
Blake2s (256 bits) cryptographic hash algorithm
Constructors
Blake2s_256 |
Instances
encode :: (HashAlgorithm a, Codable a, Show a) => Base -> MultihashDigest a -> String Source #
Encoder for Multihash
es.
Throws an error if the Multihash length field does not match the Digest length
multihash :: (HashAlgorithm a, Codable a, ByteArrayAccess bs) => a -> bs -> MultihashDigest a Source #
multihashlazy :: (HashAlgorithm a, Codable a) => a -> ByteString -> MultihashDigest a Source #