Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 64 lines (44 sloc) 1.896 kB
cde9d65 @vincenthz switch to markdown for the README.
authored
1 CryptoHash
2 ==========
3
4 hs-cryptohash provides lots of different secure digest algorithms, also
5 called cryptohashes. It exposes every common hashes, but also some
6 more exotic hashes, provides an extensive list of hashes available
7 with a consistant API.
8
9 The general performance are comparable to the most optimised hashes
10 available.
11
12 The complete list of supported hashes:
13
14 * MD2, MD4, MD5
15 * RIPEMD160
16 * SHA1
17 * SHA-2 family: 224, 256, 384, 512 and the newer 512t
18 * Skein: 256, 512
19 * Tiger
20
21 You can easily import any hash with the following:
22
23 import qualified Crypto.Hash.<HASH> as <Hash>
24
25 suggestion: it's easier to import qualified since there's
26 a collision with the init symbol, but for only importing
27 the hash or hashlazy function there's no such need.
28
29 Every hashes, exposes a very similar API.
30
9ea59c1 @vincenthz markdown fixups
authored
31 Incremental API
32 ---------------
cde9d65 @vincenthz switch to markdown for the README.
authored
33
34 it's based on 3 different functions, similar to the lowlevel operations
35 of a typical hash:
36
37 * init: create a new hash context
38 * update: update non-destructively a new hash context with a strict bytestring
39 * finalize: finalize the context and returns a digest bytestring.
40
41 all those operations are completely pure, and instead of changing the
42 context as usual in others language, it create a new context each time.
43
9ea59c1 @vincenthz markdown fixups
authored
44 One Pass API
45 ------------
cde9d65 @vincenthz switch to markdown for the README.
authored
46
47 The one pass API use the incremental API under the hood, but expose
48 common operations to create digests out of a bytestring and lazy bytestring.
49
50 * hash: create a digest (init+update+finalize) from a strict bytestring
51 * hashlazy: create a digest (init+update+finalize) from a lazy bytestring
52
9ea59c1 @vincenthz markdown fixups
authored
53 Integration with crypto-api
54 ---------------------------
cde9d65 @vincenthz switch to markdown for the README.
authored
55
56 cryptohash is fully integrated with crypto-api and you can use the
57 related function in crypto-api to use any cryptohash modules.
58
9ea59c1 @vincenthz markdown fixups
authored
59 Performance
60 -----------
cde9d65 @vincenthz switch to markdown for the README.
authored
61
62 Cryptohash uses C implementations to provides maximum performance.
63 see the cbits directory for more information
Something went wrong with that request. Please try again.