]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/doc/hash.txt
Added building of a separate libucw package.
[libucw.git] / ucw / doc / hash.txt
index bac3b9c9aeb1f3d44adc5ea6988f9ba243302052..bcdbb7e389ba19c6bddaa533a2e496ff69eebac3 100644 (file)
@@ -6,33 +6,35 @@ Libucw contains two cryptographic hash algorithms: MD5 (RFC 1321) and SHA1 (RFC
 
 There are non-cryptographic hashes as well.
 
 
 There are non-cryptographic hashes as well.
 
-Cryptographic ones
-------------------
+<<crypto,Cryptographic ones>>:
 
 - <<md5,MD5>>
 - <<sha1,SHA1>>
 - <<sha1:sha1_hmac(),SHA1_HMAC>>
 - <<usage,Common usage>>
 
 
 - <<md5,MD5>>
 - <<sha1,SHA1>>
 - <<sha1:sha1_hmac(),SHA1_HMAC>>
 - <<usage,Common usage>>
 
-Non-cryptographic ones
-----------------------
+<<nocrypto,Non-cryptographic ones>>:
 
 - <<strhash,String & block hashes>>
 - <<inthash,Integer hashes>>
 
 
 - <<strhash,String & block hashes>>
 - <<inthash,Integer hashes>>
 
+[[crypto]]
+Cryptographic hashes
+--------------------
+
 [[md5]]
 MD5
 [[md5]]
 MD5
----
+~~~
 !!ucw/md5.h
 
 [[sha1]]
 SHA1
 !!ucw/md5.h
 
 [[sha1]]
 SHA1
-----
+~~~~
 !!ucw/sha1.h
 
 [[usage]]
 Common usage
 !!ucw/sha1.h
 
 [[usage]]
 Common usage
-------------
+~~~~~~~~~~~~
 
 There are two ways you can use the hashing routines.
 
 
 There are two ways you can use the hashing routines.
 
@@ -61,4 +63,11 @@ SHA1 has the same interface, so the same two ways apply.
 
 See also <<string:mem_to_hex()>>.
 
 
 See also <<string:mem_to_hex()>>.
 
+[[nocrypto]]
+Non-cryptographic hashes
+------------------------
+
+All these functions expect to be moduled by the size of a hash table.
+The size should be a prime number (it gives better distribution).
+
 !!ucw/hashfunc.h
 !!ucw/hashfunc.h