当前位置:网站首页>[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
边栏推荐
- Kubernetes family container housekeeper pod online Q & A?
- Gbase 8C system table PG_ cast
- How to return ordered keys after counter counts the quantity
- Gbase 8C system table PG_ constraint
- [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)
- Le processus de connexion mysql avec docker
- Deep learning: multi-layer perceptron and XOR problem (pytoch Implementation)
- js根据树结构查找某个节点的下面的所有父节点或者子节点
- Gbase 8C system table PG_ amop
- Mathematical statistics -- Sampling and sampling distribution
猜你喜欢

面试项目技术栈总结

《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨

Practice of traffic recording and playback in vivo
![[hcia]no.15 communication between VLANs](/img/59/a467c5920cbccb72040f39f719d701.jpg)
[hcia]no.15 communication between VLANs

一文带你了解 ZigBee
![[translation] the background project has joined the CNCF incubator](/img/0b/e3d2674b1a1cba3ea398cbcb1a018a.png)
[translation] the background project has joined the CNCF incubator

Three. JS local environment setup

Error invalid bound statement (not found): com ruoyi. stock. mapper. StockDetailMapper. XXXX solution

Choose it when you decide

MATLAB小技巧(24)RBF,GRNN,PNN-神经网络
随机推荐
Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记
GBase 8c触发器(二)
【富瀚6630编码存录像,用rtsp服务器及时间戳同步实现vlc观看录像】
Introduction to cron expression
Gbase 8C function / stored procedure parameters (I)
Today, it's time to copy the bottom!
leetcode540
Sqlserver row to column pivot
Principle and application of database
超好用的日志库 logzero
Hcip137-147 title + analysis
yii2 中andWhere多个or查询 orm条件
[fluent] future asynchronous programming (introduction | then method | exception capture | async, await keywords | whencomplete method | timeout method)
Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
Packing and unpacking of JS
Add some hard dishes to the interview: how to improve throughput and timeliness in delayed task scenarios!
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
定了,就选它
Use optimization | points that can be optimized in recyclerview
Add automatic model generation function to hade