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

Storing the referrer in session... problems with tabs
Hello All

I am currently working on an ERP project based on the MVC methodology, when a user

shift numbers with paging
Hi

How would i be able to display 10 numbers 1 2 3 4 5 6 7 8 9 10
and when I click next

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

IDOC error
Hi, When i send IDOC from ECC system to MII there is no problem ECC side, i says message sent succe

insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

how can we add data from dynamic fields to mysql db in php
i have a script which i found on the internet. i modify that script according to my needs. what is i

Passing variables with pagination - iterating through unique id per link
Hi everyone,
I have seen a few topics like this one. Still cant find the specific thing, so I am

How to assign JS screen.width to ASP.Net variable
I've got this ASP.net routine that gets the cookie value of the screen width, but now I need to chan

DateObject and Nulls
Hi all,

I have an array mapped to a value object. One of the items in the array is a PHP Date

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