編輯:關於android開發
package com.liu.hellomavenweb.util; import java.security.MessageDigest; /** * * @author 劉楠 * */ public class MD5 { private static final char[] hexDigits = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; public MD5() { } public static String hexdigest(String string) { String s = null; try { s = hexdigest(string.getBytes()); } catch (Exception var3) { var3.printStackTrace(); } return s; } public static String hexdigest(byte[] bytes) { String s = null; try { MessageDigest e = MessageDigest.getInstance("MD5"); e.update(bytes); byte[] tmp = e.digest(); char[] str = new char[32]; int k = 0; for(int i = 0; i < 16; ++i) { byte byte0 = tmp[i]; str[k++] = hexDigits[byte0 >>> 4 & 15]; str[k++] = hexDigits[byte0 & 15]; } s = new String(str); } catch (Exception var8) { var8.printStackTrace(); } return s; } public static void main(String[] args) { String ss="但是阿凡煩煩煩fdsf達"; System.out.println(MD5.hexdigest(ss)); } }
android四大組件之Broadcast,androidbroadcast 廣播的概念 現實中:我們常常使用電台通過發送廣播發布消息,買個收音機,就能收聽 Andro
Android java傳遞int類型數組給C,androidint接著前面的文章《Android java傳遞int類型數據給C》《Android java傳遞stri
Android動態資源加載原理和應用 動態加載資源原理 通常我們調用getResources()方法獲取資源文件 public Resources getResourc
Android自定義標題TitleView,androidtitleview Android開發過程中,經常遇到一個項目需要重復的定義相同樣式的標題欄,And
Failed to apply plugin [id 'com.