当前位置:网站首页>[C language] MD5 encryption for account password
[C language] MD5 encryption for account password
2022-07-03 02:47:00 【I&You】
Give the account password MD5 encryption
The source code parsing
//md5 Encrypt user password
UtlMd5_t ctx;
unsigned char serverDigest[16];
utl_md5_init(&ctx);
//md5 initialization
utl_md5_update(&ctx, "admin", strlen("admin"));
// Pass the encrypted information to the initialized MD5 Structure , No return value
// Cross account
utl_md5_update(&ctx, "debug_get_vs_status", strlen("debug_get_vs_status"));
// Transmit control instructions
utl_md5_update(&ctx, "admin123", strlen("admin123"));
// Pass the code
utl_md5_final(&ctx, serverDigest);
// convert to 32 Bit 16 Base string
int i=0;
unsigned char decrypt32[64]={
0};
char temp[8]={
0};
for(i=0;i<16;i++)
{
sprintf(temp,"%02x",serverDigest[i]);// Convert hex to string %x=0x6b ==> %s="6b"
strcat((char *)decrypt32,temp);
}
// Last generated decrypt32 That is to say md5 Encrypted password :"6be7c69c5cdf177753270cf390ef1e90"
// Successfully sent
/*
Content-Length: 133
Content-Type: application/json;charset=utf-8
Connection: close
{
"method": "debug_get_vs_status",
"param": {
},
"user": {
"name": "admin",
"digest": "6be7c69c5cdf177753270cf390ef1e90"
}
} Send successfully length 251!
Response message header :
*******************************
HTTP/1.1 200 OK
Content-Length: 1640
Content-Type: application/json;charset=utf-8
Connection: close
*/
Source download
边栏推荐
- Two dimensional format array format index subscript continuity problem leads to return JSON format problem
- Concrete CMS vulnerability
- Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
- Le processus de connexion mysql avec docker
- Summary of interview project technology stack
- Xiaodi notes
- [fluent] future asynchronous programming (introduction | then method | exception capture | async, await keywords | whencomplete method | timeout method)
- 【翻译】Flux安全。通过模糊处理获得更多信心
- Why choose a frame? What frame to choose
- C语言中左值和右值的区别
猜你喜欢
超好用的日志库 logzero
HW-初始准备
Random Shuffle attention
Kubernetes cluster log and efk architecture log scheme
错误Invalid bound statement (not found): com.ruoyi.stock.mapper.StockDetailMapper.xxxx解决
【翻译】后台项目加入了CNCF孵化器
[principles of multithreading and high concurrency: 1_cpu multi-level cache model]
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 2)
Super easy to use logzero
Check log4j problems using stain analysis
随机推荐
Packing and unpacking of JS
Hcip137-147 title + analysis
Add automatic model generation function to hade
Principle and application of database
Gbase 8C trigger (III)
当lambda没有输入时,是何含义?
Gbase 8C function / stored procedure definition
xiaodi-笔记
Tensorflow to pytorch notes; tf. gather_ Nd (x, y) to pytorch
"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
JS的装箱和拆箱
Interview stereotyped version
sql server 查询指定表的表结构
Xiaodi notes
HW initial preparation
C语言初阶-指针详解-庖丁解牛篇
Choose it when you decide
[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
Gbase 8C system table PG_ attribute
簡單理解svg