dpa0760 2010-03-10 02:08
浏览 91
已采纳

如何在javascript中加密数据并在php中解密?

Is there any javascript function that can encrypt data: For example i want to use encrypted data in my URL passed by ajax GET request,

http://sample.com/mypage/TDjsavbuydksabjcbhgy

where TDjsavbuydksabjcbhgy an encrypted data equivalent to 12345. Now i want to retrieve that data in PHP by decrypting it, so that i can use the 12345.

Is it possible? or any suggestion on how to do that.

Thanks in advance.

  • 写回答

4条回答 默认 最新

  • douwa0280 2010-03-10 02:14
    关注

    I'm not sure what you would gain by doing encryption in javascript. Your entire routine and encryption key are effectively available to the public. If you are trying to protect against sniffing, you should use SSL.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题