Package0.11.9DataCryptography
cryptohash
collection of crypto hashes, fast, pure and practical
- Version0.11.9
- CategoryData, Cryptography
- LicenceBSD-3-Clause
- AuthorVincent Hanquez <vincent@snarc.org>
- MaintainerVincent Hanquez <vincent@snarc.org>
- Homepagegithub.com/vincenthz/hs-cryptohash
- Pinned byhackage cryptohash 0.11.9
- Sourcehackage.haskell.org/package/cryptohash-0.11.9
Modules
20 modules- Crypto.Hash35Generalized cryptographic hash interface, that you can use with cryptographic hash
- Crypto.Hash.MD27A module containing MD2 bindings
- Crypto.Hash.MD47A module containing MD4 bindings
- Crypto.Hash.MD57A module containing MD5 bindings
- Crypto.Hash.RIPEMD1607A module containing RIPEMD160 bindings
- Crypto.Hash.SHA17A module containing SHA1 bindings
- Crypto.Hash.SHA2247A module containing SHA224 bindings
- Crypto.Hash.SHA2567A module containing SHA256 bindings
- Crypto.Hash.SHA37A module containing SHA3 bindings WARNING: this implementation is not SHA3 as standardize, but
- Crypto.Hash.SHA3847A module containing SHA384 bindings
- Crypto.Hash.SHA5128A module containing SHA512 bindings
- Crypto.Hash.SHA512t6A module containing SHA512/t
- Crypto.Hash.Skein2567A module containing Skein256 bindings
- Crypto.Hash.Skein5127A module containing Skein512 bindings
- Crypto.Hash.Tiger7A module containing Tiger bindings
- Crypto.Hash.Types4Crypto hash types definitions
- Crypto.Hash.Whirlpool7A module containing Whirlpool bindings
- Crypto.MAC8Crypto hash generic MAC (Message Authentification Code) module
- Crypto.MAC.HMAC1provide the HMAC (Hash based Message Authentification Code) base algorithm.
- Crypto.MAC.SHA38provide a simple SHA3 MAC mechanism with mac = hash(key|message)
Description
DEPRECATED: this library is still fully functional, but please use cryptonite for new projects and convert old one to use cryptonite. This is where things are at nowadays.
A collection of crypto hashes, with a practical incremental and one-pass, pure APIs, with performance close to the fastest implementations available in other languages.
The implementations are made in C with a haskell FFI wrapper that hide the C implementation.
Simple examples using the unified API:
import Crypto.Hash sha1 :: ByteString -> Digest SHA1 sha1 = hash hexSha3_512 :: ByteString -> String hexSha3_512 bs = show (hash bs :: Digest SHA3_512)
Simple examples using the module API:
import qualified Crypto.Hash.SHA1 as SHA1 main = putStrLn $ show $ SHA1.hash (Data.ByteString.pack [0..255])
import qualified Crypto.Hash.SHA3 as SHA3 main = putStrLn $ show $ digest where digest = SHA3.finalize ctx ctx = foldl' SHA3.update iCtx (map Data.ByteString.pack [ [1,2,3], [4,5,6] ] iCtx = SHA3.init 224
Depends on
6 packages- base-4.20.2.0with GHC
- byteable-0.1.1in this set
- bytestring-0.12.2.0with GHC
- cryptonite-0.30in this set
- ghc-prim-0.12.0with GHC
- memory-0.18.0in this set