@@ -0,0 +1,1928 @@
+package com.github.podd.utils;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.math.BigInteger;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.security.DigestInputStream;%0Aimport java.security.MessageDigest;%0Aimport java.security.NoSuchAlgorithmException;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.concurrent.ConcurrentHashMap;%0Aimport java.util.concurrent.ConcurrentMap;%0A%0Apublic class PoddDigestUtils%0A%7B%0A    public ConcurrentMap%3CPath, ConcurrentMap%3CString, String%3E%3E getDigests(List%3CPath%3E pathsToDigest) throws IOException,%0A        NoSuchAlgorithmException%0A    %7B%0A        ConcurrentMap%3CPath, ConcurrentMap%3CString, String%3E%3E result = new ConcurrentHashMap%3C%3E();%0A        %0A        for(Path nextPath : pathsToDigest)%0A        %7B%0A            try (final InputStream inputStream = Files.newInputStream(nextPath))%0A            %7B%0A                DigestInputStream shaStream = new DigestInputStream(inputStream, MessageDigest.getInstance(%22SHA-1%22));%0A                DigestInputStream md5Stream = new DigestInputStream(shaStream, MessageDigest.getInstance(%22MD5%22));%0A                byte%5B%5D shaDigest = shaStream.getMessageDigest().digest();%0A                byte%5B%5D md5Digest = md5Stream.getMessageDigest().digest();%0A                String shaDigestString = new BigInteger(1, shaDigest).toString(16);%0A                String md5DigestString = new BigInteger(1, md5Digest).toString(16);%0A                ConcurrentMap%3CString, String%3E nextMap = new ConcurrentHashMap%3CString, String%3E();%0A                ConcurrentMap%3CString, String%3E putIfAbsent = result.putIfAbsent(nextPath, nextMap);%0A                if(putIfAbsent != null)%0A                %7B%0A                    nextMap = putIfAbsent;%0A                %7D%0A                nextMap.putIfAbsent(%22MD5%22, md5DigestString);%0A                nextMap.putIfAbsent(%22SHA-1%22, shaDigestString);%0A            %7D%0A        %7D%0A        %0A        return result;%0A    %7D%0A    %0A%7D%0A

add PoddDigestUtils.getDigests