当前位置:网站首页>js异或混淆代码
js异或混淆代码
2022-06-29 06:41:00 【Liingot】
字符串异或
/**
*
* @param {*} unEncrypted 需要异或的字符串
* @returns
*/
export const strUnicode = (unEncrypted) => {
// 异或混淆
var unicode = "0x75"; //用来异或的key(必须和后台一致,不然后台反异或解不出来)
var encrypted = '';
for (var i = 0; i < unEncrypted.length; i++) {
encrypted += String.fromCharCode(unEncrypted.charCodeAt(i) ^ unicode);
}
return encrypted;
}Byte数组异或
/**
*
* @param {*} unEncrypted Byte数组
* @returns
*/
export const strUnicode = (unEncrypted) => {
let key = "0x75";
let buffer = new ArrayBuffer(16);//Byte数组的length
let uintArr = new Uint8Array(buffer);
for (let i = 0; i < unEncrypted.length; i++) {
uintArr[i] = unEncrypted[i] ^ key;
}
return uintArr;
}边栏推荐
- cv2.cvtColor
- [量化投资系统]Django从数据库中实现筛选及分页
- Loop nesting: why can large loops inside and small loops outside improve the running efficiency of programs
- 基于Sophus的Ceres优化
- 打包时提示: Property ‘sqlSessionFactory‘ or ‘sqlSessionTemplate‘
- KingbbaseES V8R6集群维护案例之---集群之间数据迁移
- SQL 注入绕过(六)
- 101. symmetric binary tree (recursive and iterative methods)
- 【工控老马】西门子PLC s7-300SCL编程详解
- Unexpected exception ... code: Badrequest when downloading Xilinx 2018.2
猜你喜欢

Vulnhub's DC8 target

tf. count_ nonzero

What you should know about databases

【深度之眼吴恩达机器学习作业班第四期】Linear Regression with One Variable,单变量线性回归

Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case

【工控老马】基于西门子S7-200PLC的跑马灯控制系统的设计方案详解

matlab simulink 电网扫频仿真和分析

Schnuka: 3D visual inspection scheme 3D visual inspection application industry

Appium automation test foundation ADB common commands (III)

Appium自动化测试基础 — ADB常用命令(二)
随机推荐
从Nacos客户端谈Nacos配置中心
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
Vulnhub's dc6 target
KingbbaseES V8R6集群维护案例之---集群之间数据迁移
Wechat applet learning notes (summer vacation)
Kingbasees v8r6 cluster maintenance case -- single instance data migration to cluster case
Detailed design of PLC program control system for washing machine
Fluent imitates uiswitch
358. K 距离间隔重排字符串 排序
【域渗透提权】CVE-2020-1472 NetLogon 权限提升漏洞
Oracle batch insert data - insert ethnic data
Matlab Simulink simulation and analysis of power grid sweep frequency
postman预处理/前置条件Pre-request
Schnuka: automatic tire grabbing installation, 3D visual positioning, automatic robot grabbing
Schnuka: what is visual positioning system? How visual positioning system works
1031 Hello World for U
蓝桥杯——13届第二批试题解析
关于开发web场景下如何解决手机访问web跨域问题
Explanation of swing transformer theory
358. K distance interval rearrange string sorting