Just in case you did not observe, the function of Lance is independent of hash fuction used to get HMAC , so if one use sha1() function from php instead md5() will get sha1 HMAC.
Just try .
Thanks again Lance
![]() | mhashDescriptionstring mhash ( int hash, string data [, string key] )mhash() applies a hash function specified by hash to the data and returns the resulting hash (also called digest). If the key is specified it will return the resulting HMAC. HMAC is keyed hashing for message authentication, or simply a message digest that depends on the specified key. Not all algorithms supported in mhash can be used in HMAC mode. In case of an error returns FALSE. ![]()
marcel446 at yahoo dot com
06-Jun-2005 07:15
Just in case you did not observe, the function of Lance is independent of hash fuction used to get HMAC , so if one use sha1() function from php instead md5() will get sha1 HMAC.
robbie [at] averill [dot] co [dot] nz
19-Mar-2005 09:17
This confused me a bit when I first read the documetation for mhash. The functions that accept a hash accept them as an INTEGER not a STRING. In this case, MHASH_MD5 = 1. It is a constant, not a string.
fernan at ispwest dot com
02-Nov-2004 04:03
Thanks a lot to Lance for showing how to create mhash without installing the perl extension for mhash.
jerry d0t wilborn at fast d0t net
03-Jul-2004 12:36
in responce to lance's post:
lance_rushing at hot* spamfree *mail dot com
10-Jul-2003 08:02
Don't forget php has two built in hashing algorithms:
lance_rushing at hot* spamfree *mail dot com
28-Nov-2002 12:36
Want to Create a md5 HMAC, but don't have hmash installed?
shimon_d at hotmail dot com
23-Aug-2002 03:05
password security:
luc at 2113 dot ch
28-Dec-2001 09:42
Netscape messaging / directory server 4+ uses SHA-1
paulj at 5emedia dot net
07-Dec-2001 02:02
Many digest algorithms (especially MD5) are less secure if you are hashing data that is smaller than the algorithm's output. I recommend either hashing a secret key/salt with the original data to increase it's security.
braben at teleline.es
13-May-2001 04:41
If you are going to use only MD5 sums, it would be a good idea to use the internal's PHP function md5() ir order to avoid the library dependence.
03-May-2001 04:02
Using RedHat 7.1, after compile/install, I had to add the line
| ![]() |