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

Did you know?Explore Trending and Topic pages for more stories like this.
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

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

php mail form text wont appear / javascript included
Guys/gals...

I am running into a problem whereby I have a great piece of javascript code that

PHP Error
On my .php page I have a drop down box that has several names in it. When a user clicks the name &am

Pass sql into pl/sql and create RMAN duplicate script.
Hi,

I'm new to pl/sql and I'm trying to write a script that will generate some RMAN comma

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

Progress bar for webpage
Hi,
I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Mi

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Error In Syntax
I got this error:

Code: Parse error: syntax error, unexpected '>' in /home/bucket/publ

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

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