summaryrefslogtreecommitdiffstats
path: root/obex
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2011-02-01 21:54:09 -0800
committerBrian Carlstrom <bdc@google.com>2011-02-01 22:25:47 -0800
commit929a1c219248b62778807cac8ea256c7ac0fda6a (patch)
tree827313f320bbbd767f720537e49e3dc87c8ef46e /obex
parent4e96efe2edb73a8fbe4b89e85e03327da9796d80 (diff)
downloadframeworks_base-929a1c219248b62778807cac8ea256c7ac0fda6a.zip
frameworks_base-929a1c219248b62778807cac8ea256c7ac0fda6a.tar.gz
frameworks_base-929a1c219248b62778807cac8ea256c7ac0fda6a.tar.bz2
Removing android.security.MessageDigest
Bug: 3392028 Change-Id: I6b9732da17d086ba00c846c3ad1c7fb39baf9502
Diffstat (limited to 'obex')
-rw-r--r--obex/javax/obex/ObexHelper.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/obex/javax/obex/ObexHelper.java b/obex/javax/obex/ObexHelper.java
index 1b66662..df0e0fb 100644
--- a/obex/javax/obex/ObexHelper.java
+++ b/obex/javax/obex/ObexHelper.java
@@ -32,11 +32,11 @@
package javax.obex;
-import android.security.Md5MessageDigest;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
@@ -916,8 +916,12 @@ public final class ObexHelper {
* @return the MD5 hash of the byte array
*/
public static byte[] computeMd5Hash(byte[] in) {
- Md5MessageDigest md5 = new Md5MessageDigest();
- return md5.digest(in);
+ try {
+ MessageDigest md5 = MessageDigest.getInstance("MD5");
+ return md5.digest(in);
+ } catch (NoSuchAlgorithmException e) {
+ throw new RuntimeException(e);
+ }
}
/**