javascript增加干扰数据实现简单加密效果

来源:asp之家 时间:2011-02-24 11:07:00 

代码如下:


var lishustr = "qwertyuiopasdfghjklmnbvcxz";
var s = lishustr.split("");
var lishua = ""; var lishub = ""; var lishuc = ""; var lishud = "";
lishua = s[getRandomNum(1,26)]; lishub = s[getRandomNum(1,26)]; lishuc = s[getRandomNum(1,26)]; lishud = s[getRandomNum(1,26)];
switch ("abcdefghijklmnopqrstuvwxyz".indexOf(lishud) + 1) {
case 1: case 2: case 3: case 4: case 5: case 6: case 7:
md5words = md5words + lishua + lishub + lishuc + lishud; break;
case 8: case 9: case 10: case 11: case 12: case 13: case 14:
md5words = lishua + md5words + lishub + lishuc + lishud; break;
case 15: case 16: case 17: case 18: case 19: case 20:
md5words = lishua + lishub + md5words + lishuc + lishud; break;
case 21: case 22: case 23: case 24: case 25: case 26:
md5words = lishua + lishub + lishuc + md5words + lishud; break;
}
function getRandomNum(lbound, ubound) {
return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}


本文网址: http://www.lantian360.com/blueblog/blog.asp?id=G37
转发请保留此网址,谢谢合作。

标签:干扰数据,加密
0
投稿

猜你喜欢

  • python dlib人脸识别代码实例

    2021-04-05 12:57:33
  • CentOS下安装MySQL5.6.10和安全配置教程详解

    2024-01-24 08:28:26
  • win32com操作word之Application&Documents接口学习

    2021-03-01 13:30:34
  • Python是什么 Python的用处

    2021-12-20 05:55:37
  • 在WIN命令提示符下mysql 用户新建、授权、删除,密码修改

    2024-01-17 23:34:48
  • Python爬虫中urllib库的进阶学习

    2023-12-13 19:31:53
  • js判断undefined类型,undefined,null, 的区别详细解析

    2024-05-09 10:34:26
  • python写入文件自动换行问题的方法

    2022-06-13 11:28:18
  • Python破解BiliBili滑块验证码的思路详解(完美避开人机识别)

    2022-08-23 06:39:23
  • Google的用户体验设计原则

    2009-01-12 18:31:00
  • python深度学习之多标签分类器及pytorch实现源码

    2022-09-26 01:09:12
  • 用Mimer Validator检查SQL查询

    2024-01-24 17:12:01
  • Python自动化办公之Word转PDF的实现

    2022-10-04 05:30:50
  • 详解MySql自连接,外连接,内连接 ,左连接,右连接

    2024-01-25 05:40:52
  • Python生成短uuid的方法实例详解

    2021-06-30 14:12:03
  • Oracle CBO 的 _sort_elimination_cost_ratio 参数

    2008-07-22 12:24:00
  • 巧用局部变量提升javascript性能

    2024-04-18 09:33:19
  • Python selenium把歌词评论做成词云图

    2022-12-29 10:17:35
  • 用Python实现写倒序输出(任意位数)

    2023-06-12 17:46:33
  • python名片管理系统开发

    2022-06-25 13:43:47
  • asp之家 网络编程 m.aspxhome.com