diff options
author | Brian Carlstrom <bdc@google.com> | 2011-02-01 21:54:09 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-02-01 22:25:47 -0800 |
commit | 929a1c219248b62778807cac8ea256c7ac0fda6a (patch) | |
tree | 827313f320bbbd767f720537e49e3dc87c8ef46e /obex | |
parent | 4e96efe2edb73a8fbe4b89e85e03327da9796d80 (diff) | |
download | frameworks_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.java | 12 |
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); + } } /** |