Home > Web Front-end > JS Tutorial > Static web page encryption_javascript skills

Static web page encryption_javascript skills

WBOY
Release: 2016-05-16 19:24:02
Original
1166 people have browsed it

前两天看见有人问静态网页加密问题,就写了这个代码 
稍微有些长,解释一下思路: 
加密时:先把用户的密钥A用md5加密为B,然后用B异或源文件S0得到目标文件S1,把S1存入js变量中。 
解密时:询问密钥,然后操作同加密。 
因为用了md5,个人认为没有密钥的时候是无法破解的(暴力除外) 

大家试用一下 


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template