乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      java生成md5值

       iversion 2007-09-25

      =====================

      這個就不用多說了,也不用down什么包,就OK

      ===============================================

      package shop;

      import java.security.*;


      public class MD5 {
          public final static String MD5(String s) {
              char hexDigits[] = {
                                 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
                                 'a', 'b', 'c', 'd', 'e', 'f'};
              try {
                  byte[] strTemp = s.getBytes();
                  MessageDigest mdTemp = MessageDigest.getInstance("MD5");
                  mdTemp.update(strTemp);
                  byte[] md = mdTemp.digest();
                  int j = md.length;
                  char str[] = new char[j * 2];
                  int k = 0;
                  for (int i = 0; i < j; i++) {
                      byte byte0 = md[i];
                      str[k++] = hexDigits[byte0 >>> 4 & 0xf];
                      str[k++] = hexDigits[byte0 & 0xf];
                  }
                  return new String(str);
              } catch (Exception e) {
                  return null;
              }
          }

          public static void main(String[] args) {
              System.out.print(MD5.MD5("XX"));
          }



      Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1529024

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多