在客户端加密密码并在服务器端解密 [英] Encrypting password at client side and decrypting at server side

查看:151
本文介绍了在客户端加密密码并在服务器端解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用javascript加密我的密码,然后在服务器端使用php解密,任何人都可以告诉我完成它的最简单方法。谢谢

Hi, I want to encrypt my password using javascript and then decrypt it using php at server side, can anyone tell me the simplest way to accomplish it. Thanks

推荐答案

你永远不应该解密密码,甚至不要检查它们。将加密密码存储在数据库中,并检查加密数据。没有理由解密密码,你应该使用单向加密,不能解密以获得额外的安全性。
You should never decrypt passwords, not even to check them. Store the encrypted password in the database and check the encrypted data to that. There is no reason to ever decrypt passwords, and you should be using an encryption that is one way and can't be decrypted for extra security.


嗨朋友,

有一个名为crypto-js的javascript库(在Google上搜索)...这个库提供了在客户端使用javascript加密数据等的选项....



我希望它有所帮助....



有问候

Tushar Srivastava
Hi Friend,
There is a javascript library called crypto-js (search on Google)... This library provides you with options to encrypt data etc using javascript on client....

I hope it helped....

With Regards
Tushar Srivastava


这篇关于在客户端加密密码并在服务器端解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆