in reply to Re: Need a wait to generate a 4 digit "PIN" number
in thread Need a wait to generate a 4 digit "PIN" number
This is not homework and I didn't have a code sample as I was trying to find a way to do this. I have the bits already concatenated. I have a hex MD5hash of the concatenated string.
You gave me the thought to use a Solaris like SUM of the string. So I did this:
$pinc=join("$data1","$data2","$data3"); $digest2 = md5_hex($pinc); $pin=unpack("%32C*",$digest2) % 65535; print "[$pinc],[$digest2],[$pin]";
and I get:
[ilikeyoumy@email.comilikepie] [be256d5090d0875e7812428991d70026] [1961]
This seems to work.
Do you have an opinion on this?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need a wait to generate a 4 digit "PIN" number
by ikegami (Patriarch) on Dec 16, 2007 at 05:44 UTC | |
by jaiello (Novice) on Dec 16, 2007 at 07:35 UTC | |
by ikegami (Patriarch) on Dec 16, 2007 at 15:59 UTC | |
by jaiello (Novice) on Dec 17, 2007 at 23:53 UTC | |
by lidden (Curate) on Dec 16, 2007 at 10:04 UTC |