Back to project page android-pdfview.
The source code is released under:
GNU General Public License
If you think the Android project android-pdfview listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.vudroid.core.utils; //from w ww . java 2 s . c om import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5StringUtil { private static final MessageDigest digest; static { try { digest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } } public static String md5StringFor(String s) { final byte[] hash = digest.digest(s.getBytes()); final StringBuilder builder = new StringBuilder(); for (byte b : hash) { builder.append(Integer.toString(b & 0xFF, 16)); } return builder.toString(); } }