Android Open Source - generalsbuzz M D5






From Project

Back to project page generalsbuzz.

License

The source code is released under:

MIT License

If you think the Android project generalsbuzz listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package me.kworden.wlcalendar2.util;
/*from ww w .j ava2  s .  com*/
import java.security.MessageDigest;

public class MD5
{
  public static String getMessageDigest(String p_data)
  {
    try
    {
      StringBuffer hexString = new StringBuffer();
      MessageDigest md = MessageDigest.getInstance("MD5");
      byte[] hash = md.digest(p_data.getBytes());
  
          for(int i = 0; i < hash.length; i++)
          {
              if((0xff & hash[i]) < 0x10)
              {
                  hexString.append("0"
                          + Integer.toHexString((0xFF & hash[i])));
              }
              else 
                  hexString.append(Integer.toHexString(0xFF & hash[i]));
          }
          
          return hexString.toString();
    }
    catch(Exception err)
    {
      return "";
    }
    }
  
  public static boolean areSame(String p_data1, String p_data2)
  {
    return getMessageDigest(p_data1).equals(getMessageDigest(p_data2));
  }
}




Java Source Code List

me.kworden.wlcalendar2.BuildConfig.java
me.kworden.wlcalendar2.BuildConfig.java
me.kworden.wlcalendar2.MainActivity.java
me.kworden.wlcalendar2.SettingsActivity.java
me.kworden.wlcalendar2.adapter.EventAdapter.java
me.kworden.wlcalendar2.async.CheckLocalDataTask.java
me.kworden.wlcalendar2.async.ParseDataTask.java
me.kworden.wlcalendar2.async.ReadLocalDataTask.java
me.kworden.wlcalendar2.async.RequestRemoteDataTask.java
me.kworden.wlcalendar2.async.StoreDataTask.java
me.kworden.wlcalendar2.fragment.EventDisplayFragment.java
me.kworden.wlcalendar2.fragment.EventInfoFragment.java
me.kworden.wlcalendar2.fragment.SettingsFragment.java
me.kworden.wlcalendar2.receiver.CheckLocalDataReceiver.java
me.kworden.wlcalendar2.receiver.RequestRemoteDataReceiver.java
me.kworden.wlcalendar2.receiver.UpdateRowsReceiver.java
me.kworden.wlcalendar2.struct.MonthYearParcel.java
me.kworden.wlcalendar2.struct.WLEventClassifier.java
me.kworden.wlcalendar2.struct.WLEventLinebreak.java
me.kworden.wlcalendar2.struct.WLEvent.java
me.kworden.wlcalendar2.struct.WLHeader.java
me.kworden.wlcalendar2.util.APP.java
me.kworden.wlcalendar2.util.BROADCAST.java
me.kworden.wlcalendar2.util.MD5.java
me.kworden.wlcalendar2.util.PATTERNS.java
me.kworden.wlcalendar2.util.STATUS.java