md5 is it unique


Posted on 16th Feb 2014 07:03 pm by admin

I know this is most likely one of many simple questions that can be found semi easily. But I'm pressed for time. I have searched google, php.net, etc. But it only tells me how to make md5 hashes. Ok great that part I knew.

What I am curious of is, if I create a md5 hash and store it as a session a cookie, or an entry in a database for later comparison with something else. If I followed the same exact method of creating the variable for the session, with the same exact data, would it create the same exact hash as before or would it create a new hash that would be diffrent

example

$session_key = md5('Name-of-Product'.'Price'.'Shipping');
$compare_key = md5('Name-of-Product'.'Price'.'Shipping');

for the example above I would initial hash the info for the $session_key

through a series of different actions the user will eventually end up sending the data through the site via some form of variable or another $_POST or $_GET what I am tempting to do is want to make sure that if i take the user provided data that it matches that of the session I created earlier by comparing the 2 hash strings.

No comments posted yet

Your Answer:

Login to answer
271 Like 23 Dislike
Previous forums Next forums
Other forums

InternetOpenUrl() Invalid cert
Hi all,

Does anyone know how to prevent calls to InternetOpenUrl() from failing with erro

Using mysql_real_escape_string for displayed content
On my website users can input data into a textarea and it will store it in the mysql database. But,

HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to

Curl & sessions PLS HELP
Hello,

I have a problem with curl and sessions and i will try to explain the best i could.

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

count only commas outside parenteses
I have a sql table containing
id - query - query name
the first page contains a drop down men

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

help retrieiving results and doing pagination
Having some trouble trying to get the results to show on more than just one page.

What is ha

get url?
how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash