6.MD5 encryption

Source: Internet
Author: User

Any data (including software), after MD5 encryption, will generate a string of 16 bytes, the Chinese people generally call it "MD5 value".

> computes the signature (digital fingerprint) of a string or file, which is irreversible, because any file or string calculated by MD5 is a 32-bit!> database: 123456->e10adc3949ba59abbe56e057f20f883e> 654321->e10adc3949ba59abbe56e057f20f883e> online hack website: http://www.cmd5.com/> "Add salt" to MD5 to enhance security 
http://www.blogjava.net/heyang/archive/2010/11/28/339233.html> MD5 (password)->md5 (password + user nickname + User ID ...)
  
 
  1. public class MD5Utils {
  2. /**
  3. * md5加密
  4. *
  5. * @param password
  6. * @return
  7. */
  8. public static String encode(String password) {
  9. try {
  10. Span class= "Typ" >messagedigest instance = messagedigest getinstance "MD5" //get MD5 Algorithm object
  11. byte[] digest = instance.digest(password.getBytes());// 对字符串加密,返回字节数组
  12. StringBuffer sb = new StringBuffer();
  13. for (byte b : digest) {
  14. int i = b & 0xff;// 获取字节的低八位有效值
  15. String hexString = Integer.toHexString(i);// 将整数转为16进制
  16. if (hexString.length() < 2) {
  17. hexString = "0" + hexString;// 如果是1位的话,补0
  18. }
  19. sb.append(hexString);
  20. }
  21. return sb.toString();
  22. } catch (NoSuchAlgorithmException e) {
  23. e.printStackTrace();
  24. // 没有该算法时,抛出异常, 不会走到这里
  25. }
  26. return "";
  27. }
  28. }

Root Permissions
> What is root permissions? Root permissions are equivalent to system administrator privileges, with root privileges, you can modify and delete the internal phone files.
> General phone after purchase, there is no root authority. The manufacturer considers the security factor, does not allow the user or the third party app to delete and modifies the phone's internal file (of course, sdcard content can be changed at will, do not need root permission)
> How to get root privileges?> can use third-party software, such as Brush master. One-click Root
> What to do after root?> 1. Brush Machine > 2. Remove the phone's built-in app> 3. Access the files in the Data/data directory and modify them
> How to know the phone has root?> 1. Brush Machine Master (small white users with this method) > 2. See if you can access the Data/data directory, and if you can, it's already rooted > 3. CMD command line, run adb shell, if display #, indicates already root, if display $, indicates no root (if run with the real machine, even if root, also show $, this time, run the command Su, can directly get administrator rights)






From for notes (Wiz)

6.MD5 encryption

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.