Yii Framework Forum: Javascript encrypt and decrypt in PHP - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Javascript encrypt and decrypt in PHP Rate Topic: -----

#1 User is offline   juanmjimenezs 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 97
  • Joined: 15-May 09
  • Location:Colombia

Posted 14 March 2010 - 07:50 PM

Hello, I need to javascript encrypt information before sending over http and I'd like to know how I can encrypt and decrypt can then easily from php. Anyone know how I do it?. Thank you.
-1

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 14 March 2010 - 09:45 PM

Why you want to do this? There are encryption implementations for both JavaScript and PHP. But note that a JavaScript <> PHP encryption/decryption can't be secure since the algorithm and encryption key must be public in the javascript. You can only strengthen it by obfuscating the javascript code (making it unreadable, hiding the secure key).

Why is a secure connection (https) no option in this case?
0

#3 User is offline   kyle z 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 09-August 10
  • Location:oklahoma city, oklahoma

Posted 09 August 2010 - 08:55 AM

View PostY!!, on 14 March 2010 - 09:45 PM, said:

Why you want to do this? There are encryption implementations for both JavaScript and PHP. But note that a JavaScript <> PHP encryption/decryption can't be secure since the algorithm and encryption key must be public in the javascript. You can only strengthen it by obfuscating the javascript code (making it unreadable, hiding the secure key).

Why is a secure connection (https) no option in this case?


I agree. It just makes sense to use https.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users