blob: e90f50623e0c464d357065dd67994abcfe80dd1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{- Convenience wrapper around cryptohash.
-
- The resulting Digests can be shown to get a canonical hash encoding. -}
module Utility.Hash where
import Crypto.Hash
import qualified Data.ByteString.Lazy as L
sha1 :: L.ByteString -> Digest SHA1
sha1 = hashlazy
sha224 :: L.ByteString -> Digest SHA224
sha224 = hashlazy
sha256 :: L.ByteString -> Digest SHA256
sha256 = hashlazy
sha384 :: L.ByteString -> Digest SHA384
sha384 = hashlazy
sha512 :: L.ByteString -> Digest SHA512
sha512 = hashlazy
-- sha3 is not yet fully standardized
--sha3 :: L.ByteString -> Digest SHA3
--sha3 = hashlazy
skein256 :: L.ByteString -> Digest Skein256_256
skein256 = hashlazy
skein512 :: L.ByteString -> Digest Skein512_512
skein512 = hashlazy
|