Skip to content
Browse files

switch to markdown for the README.

  • Loading branch information...
1 parent c03d0ff commit cde9d65763834feef325c47e22687cfa8f312ac7 @vincenthz committed Sep 21, 2011
Showing with 60 additions and 23 deletions.
  1. +0 −22 README
  2. +59 −0 README.md
  3. +1 −1 cryptohash.cabal
View
22 README
@@ -1,22 +0,0 @@
-hs-cryptohash provides lots of different secure digest algorithms.
-
-All different cryptohashes contains the exact same API, for ease of
-switching between different hashes; this API is separated two folds:
-the incremental API and the one-pass API.
-
-= Incremental API
-
-The incremental API permits the user to compute the digest incrementally,
-with the overhead of having to box and unbox the context in and out
-the computing function.
-
-this API is made of: init, update and finalize; this is similar
-to how a digest algorithm works in other languages.
-
-= One Pass API
-
-The one pass API permits a single shot computation that doesn't have
-the overhead of boxing and unboxing at each step.
-
-this API is made of: hash and hashlazy. hash works on a strict bytestring,
-whereas hashlazy works on a lazy bytestring.
View
59 README.md
@@ -0,0 +1,59 @@
+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
View
2 cryptohash.cabal
@@ -16,7 +16,7 @@ Category: Data, Cryptography
Build-Type: Simple
Cabal-Version: >=1.6
Homepage: http://github.com/vincenthz/hs-cryptohash
-data-files: README
+data-files: README.md
extra-source-files:
cbits/bitfn.h cbits/md2.h cbits/md4.h cbits/md5.h

0 comments on commit cde9d65

Please sign in to comment.
Something went wrong with that request. Please try again.