当前位置:网站首页>What is MD5
What is MD5
2022-07-07 09:20:00 【Wow, it's a small dish】
What is? md5?
md5 Is an irreversible hash algorithm
- Irreversible : Ciphertext can be obtained from plaintext , But you can't get plaintext from ciphertext .
- hash : Get a mapping value through a function , It could be repetitive ! But the probability of repetition is relatively low , For example, set characters + Case letters + Digital password , The probability of getting the same ciphertext through hashing is very, very low .
Application scenarios
Password storage :
On safety grounds , Native passwords cannot be stored directly in the database , If the data is leaked, it will cause many problems , therefore , Will pass the password md5 Encrypted and stored in the database , I'm sure you know that .Consistency check :
This is a usage I found when making payment signatures , Not used before . When the client calls the third-party payment , Need is to use http(s) Transmission request , Once the request is blocked , Be modified , For example, payment 1000 element , Intercepted as 1 element , After successful payment , The third party returns the result of successful payment , It will cause serious damage .So people use a ciphertext , Process the request parameters into a string : for example “amount=50&payMethod=native&id=012345”, Then encrypt the string , Send with the request . After receiving the request, make a consistency check with the plaintext parameters , Check the consistency of parameters .
Of course , The real encryption means involving payment will be more complex , For example, certificates and so on , Using this example is just an illustration md5 It can be used as a means to verify the consistency of passwords .
How to improve security
Add salt
Salt value is a meaningless random string , It can be a paragraph uuid, It can also be a random number . Adding salt can prevent hackers from using some comparison tables to crack simple passwords ( such as 123456,password These common passwords , The frequency of use is very high , You can find ).Multiple encryption
Will be encrypted md5 Re encrypt the password , Cycle a few times , The ciphertext thus formed cannot be found through the comparison table .
边栏推荐
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
- STM32 serial port register library function configuration method
- Pytest installation (command line installation)
- OpenGL 3D graphics rendering
- Jenkins modifies the system time
- Port multiplexing and re imaging
- C language pointer (exercises)
- Interface test API case, data and interface separation
- Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
- Common short chain design methods
猜你喜欢
正则匹配以XXX开头的,XXX结束的
C语言指针(特别篇)
2022-07-06 unity core 9 - 3D animation
Reading notes of pyramid principle
2022-06-30 unity core 8 - model import
Upgrade Alibaba cloud RDS (relational database service) instance to com mysql. jdbc. exceptions. Troubleshooting of jdbc4.communicationsexception
Ppt template and material download website (pure dry goods, recommended Collection)
【Istio Network CRD VirtualService、Envoyfilter】
PMP Exam details after the release of the new exam outline
MySQL master-slave delay solution
随机推荐
【istio简介、架构、组件】
四、机器学习基础
Skill review of test engineer before interview
Troublesome problem of image resizing when using typora to edit markdown to upload CSDN
Expérience de port série - simple réception et réception de données
C language pointer (Part 2)
二叉树高频题型
Self awakening from a 30-year-old female programmer
Unityshader introduction essentials personal summary -- Basic chapter (I)
Detailed learning notes of JVM memory structure (I)
How long does the PMP usually need to prepare for the exam in advance?
串口實驗——簡單數據收發
Screen automatically generates database documents
Systick滴答定时器
Jenkins task grouping
PMP Exam Preparation experience systematically improve project management knowledge through learning
Leetcode刷题记录(数组)组合总和、组合总和 II
Run can start normally, and debug doesn't start or report an error, which seems to be stuck
PMP Exam Preparation experience, seek common ground while reserving differences, and successfully pass the exam
LeetCode每日一题(2316. Count Unreachable Pairs of Nodes in an Undirected Graph)