![]() |
|
#1
|
|||
|
|||
urgent help:hash functionHi can anyone provide me with a simple hash function that takes values for e.g numbers and alphabets. let say
int i =23544564; char a= jack; int j=123; int x= 202.020.22.0 and convert it to return a hash string like as4546wui thanx jack |
|
#2
|
||||
|
||||
|
Looks like you're in the wrong place. This is a forum designed to help people solve problems. If you're looking for source code, you might want to check out this website:
http://www.sourceforge.net __________________
-Aaron |
|
#3
|
||||
|
||||
|
Jack, you can't receive PM's because your mail account is filled up, so I posted a reply to you here, since it is a similar question and hopefully you will get an email message about a post.
Quote:
Hi Jack. I don't know much of anything about md5. I put together this simple sample, but I have no idea if it works right or not. If you know what you are trying to do this might get you started. Please note that you will need the openssl libraries. CPP / C++ / C Code:
When you compile you need to link with the ssl library. In gcc I did: Code:
Hope this gets you started. |
|
#4
|
||||
|
||||
|
Try this instead. The hash seems to work okay, it was the way that I was printing it that gave the difference. I get the exact same thing using md5sum as I do using this.
CPP / C++ / C Code:
|
|
#5
|
||||
|
||||
|
Dave. If you are using *nix, you should try pulling up the man page for md5. It should tell you everything about the function that you want to know. Here is the basic format of MD5:
Quote:
So while CPP / C++ / C Code:
CPP / C++ / C Code:
Also, could you please respond back in this thread? It is kind of a pain to do this through PM's and it makes me look like I am adding comments to this thread for the fun of it. ![]() cheers, d |
|
#6
|
||||
|
||||
|
I think I might have scared him away
__________________
-Aaron |
Recent GIDBlog
Stupid Management Policies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Urgent ! Pls Help Me ! | mycashmoney | C Programming Language | 4 | 01-Jul-2006 23:49 |
| Calling functions within a function | spudtheimpaler | C Programming Language | 5 | 02-Mar-2004 09:02 |
| urgent needs :apache + random function | jack | Apache Web Server Forum | 0 | 19-Jan-2004 18:41 |
| i/o: set value x (long) before it is used by a function | gmn | C Programming Language | 1 | 18-Nov-2003 02:12 |
| [class] 404 search function code | jrobbio | MySQL / PHP Forum | 6 | 22-Apr-2003 10:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The