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

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

Insert numbers from Barcode scanner into online php page
I have a real big problem, Here is what I'm trying to do. I have a Intermec CN3 handheld computer th

Hom to make one url to open together with another url
I have a chat, which i want to be opened, as soon as the users login to the site. As it is now, when

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

how to remove in php string display
My code is $message="We're looking at developing our website."; $body= "My mess

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

array help
Does anyone know how to require 10 text fields for individual grades and output class average? (10 p

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