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

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

get the country of visitor and display content based on that
Hello all,

I have seen that Google analytics can tell you where a visitor is coming from and

How to schedule the a job?
Hi,
I have prepared a task ( i.e. a procedure is prepare the file and send the same to con

Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages

highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc

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