PDA

View Full Version : encryption!


HSN
Mon 10th Jan '05, 12:05am
Hello there,

What is the best way for encrypting (and decrypting) data in Php other than using mcrypt()? Specifically, I want to encrypt URL information.

Example:

http://www.vbulletin.com/forum/newthread.php?do=newthread&f=12

will be encrypted to:

http://www.vbulletin.com/forum/!%423524954

Thx... :)

absolut
Mon 10th Jan '05, 8:44am
Only crypt() that is one-way string encryption (hashing)
P.S. But what for? :)

HSN
Mon 10th Jan '05, 11:35pm
Hashing is not useful!
What I'm planning to do is:
I have a registeration system. When a student enters, his/her ID appears in the URL to $_GET[] it and use it in different pages. I would like to encrypt this and other variables which appear in URL as a result of logging in. Using a hashing function, I need to develop a bruteforce algorithm which takes O(n) in order to manage this.
So, you suggest me any technique?! :)

Lats
Tue 11th Jan '05, 1:25am
I'd suggest using sessions, much better than using ugly url's.

http://www.php.net/manual/en/ref.session.php

Icheb
Tue 11th Jan '05, 3:25am
Just store those information in a cookie?

HSN
Tue 11th Jan '05, 4:52am
I don't like using sessions!! :D

I think cookies are also not very secure.

Icheb
Tue 11th Jan '05, 7:37am
If you want security you need SSL. If you don't use it, an attacker can intercept the login details when you login to your system just as well as he can intercept the data in a cookie.

HSN
Tue 11th Jan '05, 10:45am
How can I use the Secure Socket Layer?! I mean, how is it implemented?

UK Jimbo
Fri 14th Jan '05, 11:11am
How can I use the Secure Socket Layer?! I mean, how is it implemented?

Google for mod_ssl.

Cookie based sessions would do the trick for you.