]> matita.cs.unibo.it Git - logicplayer.git/blobdiff - mainActivity/src/com/example/furt/myapplication/MD5.java
New version (to be tested).
[logicplayer.git] / mainActivity / src / com / example / furt / myapplication / MD5.java
index 8f7bdc00dc54e323d6c9f6c52c042ae55ee82747..dc2898695b362e72192b063159c91af5036919da 100755 (executable)
@@ -11,25 +11,6 @@ public class MD5 {
 
     MD5(){}
 
-    /*public static String digest(String fileName) throws NoSuchAlgorithmException, IOException
-    {
-
-        MessageDigest md = MessageDigest.getInstance("MD5");
-        return getDigest(new FileInputStream("/var/www/html/esercizi/"+fileName), md, 2048);
-    }
-
-    public static String getDigest(InputStream is, MessageDigest md, int byteArraySize) throws NoSuchAlgorithmException, IOException
-    {
-        md.reset();
-        byte[] bytes = new byte[byteArraySize];
-        int numBytes;
-        while ((numBytes = is.read(bytes)) != -1) {
-            md.update(bytes, 0, numBytes);
-        }
-        byte[] digest = md.digest();
-        String result = new String(Hex.encodeHex(digest));
-        return result;
-    }*/
     public static String digest(String filePath) {
         InputStream inputStream = null;
         try {