Jump to content

Transfering data from Client to Server and back


Dk_ZeRO-Cool

Recommended Posts

Hi.
I have made to small Encryption scripts for my page.
One JavaScript, and one PHP. Thay both do the same thing, except that one handles the client, and the other handles the server.

The Password is encrypted by to random keys. Both keys is needed to Decrypt the password.
At the moment I tranfer both keys to and from the server by to Cookies.
But the problem is that the cookies is not allways set in time for the next script to receive them.

Is there no better way to tranfer the keys to and from the server by PHP and JavaScript?
Link to comment
Share on other sites

I know it is seen easily. That's why I have 2 reandom generated keyes to Encrypt and Decrypt the password with. And the Cookies I create, expires in a sec, right after the next script receives them.

The Encrypter is to Encrypt passwords that are send by <input> from a login part of my community.
When the server recieves the password, the PHP part of the Encrypter calls the 2 cookies that were created using the JavaScript Part of the encrypter, decrypts the password using the 2 keyes, and expires the cookies ....
But I can not use PHP to Encrypt the password before it is send to the server, that requires Client Side scripting.

And I see 2 problems using Cookies to tranfer the keyes.
1: The cookies are not allways created in time for the next script to recieve them.
2: Cookies are not the most secure place to store that kind of information. Not even in a sec.

Now, I am not a shark at XML. I just started using it.
But is XMLHTTPRequest not less secure place to store information then cookies??

I think I wrote it wrong before, sorry...
It's like i wrote above. It is not the password it self I need to tranfer. That I do with a form.
It is the 2 keyes that is needed to decrypt the password I need to tranfer...
Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.