View Full Version : password protection.

01-10-2005, 02:44 PM
Message Encrypter

I am writing some code for a school in php that requires a password. My problem is that I need the person to log on with their password and then need to pass this password to other programs without them having to log in again on every screen. If I pass it as a parameter, then it appears in the address line. Sometimes I can pass it hidden in a form but it is still showing if someone views the source. What I would like to do is encrypt the password before sending it and unscramble it the other end. The message encrypter script seems to do what I want except that I do not know java and can't work out how to extract what I need from it. I would like a script that I can use by the first program: This script uses a password and code for encrypting it which I give it in my php code (not by asking the user). I then need a script for the receiving program that also knows the code to unscramble the encrypted password passed to it.

I don't know if this makes sense or if it is possible to interact between java and php this way. Perhaps there is another way of protecting passwords that is better. Any help you can give would be greatly appreciated.


01-10-2005, 03:59 PM
I haven't looked at that link, but recommend you use PHP, just md5() the password.


$password = "mypassword";
$password = md5($password);


01-10-2005, 04:05 PM
Thanks. I have never heard of md5. I presume that gives back an encrypted password? How do I unscramble it in the second program?


01-10-2005, 04:19 PM
there is another gay. there are HTML encryptors out there, some even as safe as php.
you won't get anything out of the code. I use it in mypage, since I don't have php in my freeserver...
Still PHP is a much friendlier way

01-10-2005, 04:25 PM
there is another gay.

Uhm... You mean way?



01-10-2005, 09:33 PM
I have never heard of md5. I presume that gives back an encrypted password?MD5 is a transformation function that converts an input sequence into a 128-bit (16 byte) representation (a message digest).

How do I unscramble it in the second program?The transformation is one-way; it cannot be reversed.