Android-- landing logic implementation

Here Insert Picture Description


1285575001 QQ
wechat M010527
technical exchange QQ group 599,020,441
Annals of Science and Technology aming


MD5 algorithm MessageDigest Algorithm 5 (Information - digest algorithm)
the Message
Digest
MessageDigest
MessageDigest.getInstance ();
Because Register Login Password involved, we need the MD5 algorithm to encrypt the user's password,
MD5 algorithm is a string of any length into fixed length (typically 128) is a hexadecimal character string,
and the algorithm is not reversible.
Specific code as follows:

When you click the login button, you need to determine whether a user name and password blank.

If it is empty, you are prompted to enter a user name or password,
if not empty, then get the user name entered by the user,
due to the use of local data, you need a password based on whether there is a corresponding user name in the query SharedPreferences,
if the corresponding the password and the password entered by the user (required by the MD5 encryption) than for the same case, the login is successful

He published 183 original articles · won praise 3 · Views 5485

Guess you like

Origin blog.csdn.net/qq_33608000/article/details/104218798