Remember a MD5 encryption and decryption process

Time: February 2017

Cause : The company arranged to move the functions of a mobile client APP (IOS) to mobile HTML (implemented in JAVA). The functions that need to be moved include "user login"

process: when the user registers, the password will be MD5 After encryption, it is saved to the database, but you can log in on the HTML of the mobile phone, but the client APP reports an incorrect password. Therefore, the following investigations are carried out: 1.
Whether the tomcat encoding is set incorrectly: check the encoding as UTF-8, the problem is not
solved
Use jsonp to call the login interface used by the mobile client across domains: the problem is not
solved

...then look for the md5 encryption code of the java version on the Internet, uh... (IOS uses the CommonCrypto/CommonDigest.h header file)

Experience: ask if you don't understand, communicate more, communicate more, think more, the direction is not wrong

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326938759&siteId=291194637