Difference between revisions of "Nsmhash"

From AOLserver Wiki
Jump to navigation Jump to search
 
(update link to ns_mhash 1.1)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
= nsmhash 1.0 =
+
= nsmhash 1.1 =
Created by Richard Kotal [mailto:richard.kotal@dolphingames.com richard kotal].
+
Created by [mailto:richard.kotal@dolphingames.com Richard Kotal].
  
  
This is AOLserver module (nsmhash 1.0) that implements interface to mhash library (http://mhash.sourceforge.net).
+
This is AOLserver module that implements interface to mhash library (http://mhash.sourceforge.net).
* tested with 0.9.4 version of mhash library
+
* (nsmhash 1.0) tested with 0.9.4 version of mhash library
 
* support a lot of HASH and HMAC algorithms (MD5, SHA1, RIPEMD, GOST, ...)
 
* support a lot of HASH and HMAC algorithms (MD5, SHA1, RIPEMD, GOST, ...)
 
* support key generator algorithms (MCRYPT, HEX, ...)
 
* support key generator algorithms (MCRYPT, HEX, ...)
Line 11: Line 11:
  
  
[http://www.aolserver.cz/download.php Download page],  [http://www.aolserver.cz/download/nsmhash-1.0.tgz nsmhash-1.0.tgz]
+
[http://www.aolserver.cz/download.php Download page],  [http://www.aolserver.cz/download/nsmhash-1.1.tgz nsmhash-1.1.tgz]
  
  

Latest revision as of 16:23, 1 December 2009

nsmhash 1.1

Created by Richard Kotal.


This is AOLserver module that implements interface to mhash library (http://mhash.sourceforge.net).

  • (nsmhash 1.0) tested with 0.9.4 version of mhash library
  • support a lot of HASH and HMAC algorithms (MD5, SHA1, RIPEMD, GOST, ...)
  • support key generator algorithms (MCRYPT, HEX, ...)
  • work with nsv_*. HASH object may be shared.
  • HASH object may be serialize and save to file, db, ...


Download page, nsmhash-1.1.tgz


Simple samples:

   [ns_mhash keygen create MCRYPT "Hello world" [list MD5] 10]
   result: 3e25960a79dbc69b674c

   set td [ns_mhash hash new MD5]
   ns_mhash hash update $td "Hello world"
   set hash [ns_mhash hash end $td]
   ns_adp_puts $hash
   result: 3e25960a79dbc69b674cd4ec67a72c62

   set td [ns_mhash hmac new MD5 "password"]
   ns_mhash hmac update $td "Hello world"
   set hmac [ns_mhash hmac end -base64 $td]
   ns_adp_puts $hmac
   result: MyPQK3X37QIxu6NfSOK68g==