关于js用cookie保存帐号和密码的安全性
<scriptlanguage="javascript"><!--functionreadMember(){member="";member=readCookie("me...
<script language="javascript">
<!--
function readMember()
{
member="";
member=readCookie("member");
if(member!="")
{
form1.username.value=readCookie("username");
form1.password.value=readCookie("password");
form1.member.checked=true;
}
}
function writeMember()
{
if(form1.member.checked)
{
username=form1.username.value;
password=form1.password.value;
writeCookie("username",username,1);
writeCookie("password",password,1);
writeCookie("member","yes",1);
}
else
{
writeCookie("username","",1);
writeCookie("password","",1);
writeCookie("member","",1);
}
}
//-->
</script>
上面的js是执行保存密码的...请问怎样保障它的安全性了...就是怎样把密码变成其它的编码存在cookie中..从而不可以在cookie中直接看密码呢?? 展开
<!--
function readMember()
{
member="";
member=readCookie("member");
if(member!="")
{
form1.username.value=readCookie("username");
form1.password.value=readCookie("password");
form1.member.checked=true;
}
}
function writeMember()
{
if(form1.member.checked)
{
username=form1.username.value;
password=form1.password.value;
writeCookie("username",username,1);
writeCookie("password",password,1);
writeCookie("member","yes",1);
}
else
{
writeCookie("username","",1);
writeCookie("password","",1);
writeCookie("member","",1);
}
}
//-->
</script>
上面的js是执行保存密码的...请问怎样保障它的安全性了...就是怎样把密码变成其它的编码存在cookie中..从而不可以在cookie中直接看密码呢?? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询