当前位置:网站首页>JS XOR obfuscation code
JS XOR obfuscation code
2022-06-29 07:53:00 【Liingot】
String XOR
/**
*
* @param {*} unEncrypted A string that requires exclusive or
* @returns
*/
export const strUnicode = (unEncrypted) => {
// XOR confusion
var unicode = "0x75"; // Used for exclusive or key( Must be consistent with the background , Otherwise, the backstage anti XOR cannot be solved )
var encrypted = '';
for (var i = 0; i < unEncrypted.length; i++) {
encrypted += String.fromCharCode(unEncrypted.charCodeAt(i) ^ unicode);
}
return encrypted;
}Byte Array XOR
/**
*
* @param {*} unEncrypted Byte Array
* @returns
*/
export const strUnicode = (unEncrypted) => {
let key = "0x75";
let buffer = new ArrayBuffer(16);//Byte Array of length
let uintArr = new Uint8Array(buffer);
for (let i = 0; i < unEncrypted.length; i++) {
uintArr[i] = unEncrypted[i] ^ key;
}
return uintArr;
}边栏推荐
- MongoDB-使用mongo/mongosh命令行连接数据库
- 【深度之眼吴恩达机器学习作业班第四期】Regularization正则化总结
- 358. K 距离间隔重排字符串 排序
- Summary of array knowledge points
- Cartographer中的线程池操作
- Gateway controller communication protocol
- 1032 Sharing
- 100 lectures on Excel advanced drawing skills (VI) - practical application cases of Gantt chart in project progress
- 基础知识 - 语法标准(ANSI C、ISO C、GNU C)
- Common MySQL errors and solutions summarized painstakingly (I)
猜你喜欢

【工控老马】基于PLC的花样喷泉设计原理详解

从Nacos客户端谈Nacos配置中心

Vibration signal generation and processing based on MATLAB Doppler effect

pycharm的虚拟环境如何共享到jupyter-lab

ShapeShifter: Robust Physical Adversarial Attack on Faster R-CNN Object Detector

SQL 注入绕过(六)

100 lectures on Excel advanced drawing skills (VI) - practical application cases of Gantt chart in project progress

C#Mqtt订阅消息

打包时提示: Property ‘sqlSessionFactory‘ or ‘sqlSessionTemplate‘

【工控老马】洗衣机PLC程序控制系统设计详解
随机推荐
Gateway controller communication protocol
VSLAM特征之线特征&面特征
Concurrent idempotent anti shake
Kingbasees v8r6 cluster maintenance case - data migration between clusters
Appium automation test foundation ADB common commands (II)
Summary of array knowledge points
电检码配置
【深度之眼吴恩达机器学习作业班第四期】逻辑回归编程实现
软重启(reboot)
js实现图片懒加载的一个详细方案(引入即可使用)
Swin Transformer理论讲解
进程通信 - 管道
Django - installing mysqlclient error: mysqlclient 1.4.0 or newer is required; you have 0.9.3
tf. compat. v1.global_ variables
时间操作 - 时间格式转换
ROS当中的仿真时间以及Bag包操作
Interviewer: why does database connection consume resources? Where are the resources consumed?
nor flash 应用层操作
Check whether tensorflow supports GPU and test program
PostgreSQL安装:The database cluster initialisation failed,stack Hbulider安装