File: README.md

package info (click to toggle)
haskell-cryptohash 0.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 312 kB
  • sloc: ansic: 2,000; haskell: 1,247; makefile: 3
file content (63 lines) | stat: -rw-r--r-- 1,896 bytes parent folder | download
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
CryptoHash
==========

hs-cryptohash provides lots of different secure digest algorithms, also
called cryptohashes. It exposes every common hashes, but also some
more exotic hashes, provides an extensive list of hashes available
with a consistant API.

The general performance are comparable to the most optimised hashes
available.

The complete list of supported hashes:

* MD2, MD4, MD5 
* RIPEMD160
* SHA1
* SHA-2 family: 224, 256, 384, 512 and the newer 512t
* Skein: 256, 512
* Tiger

You can easily import any hash with the following:

    import qualified Crypto.Hash.<HASH> as <Hash>

suggestion: it's easier to import qualified since there's
a collision with the init symbol, but for only importing
the hash or hashlazy function there's no such need.

Every hashes, exposes a very similar API.

Incremental API
---------------

it's based on 3 different functions, similar to the lowlevel operations
of a typical hash:

* init: create a new hash context
* update: update non-destructively a new hash context with a strict bytestring
* finalize: finalize the context and returns a digest bytestring.

all those operations are completely pure, and instead of changing the
context as usual in others language, it create a new context each time.

One Pass API
------------

The one pass API use the incremental API under the hood, but expose
common operations to create digests out of a bytestring and lazy bytestring.

* hash: create a digest (init+update+finalize) from a strict bytestring
* hashlazy: create a digest (init+update+finalize) from a lazy bytestring

Integration with crypto-api
---------------------------

cryptohash is fully integrated with crypto-api and you can use the
related function in crypto-api to use any cryptohash modules.

Performance
-----------

Cryptohash uses C implementations to provides maximum performance.
see the cbits directory for more information