``` private fun hash(f: File): String { ...
# announcements
c
Copy code
private fun hash(f: File): String {
        MessageDigest.getInstance(hashAlgo)?.let {
            FileInputStream(f).let { f ->
                IOUtils.copy(f, DigestOutputStream(NullOutputStream(), it))
                f.close()
            }
            it.digest().map { String.format("%02x",it) }.reduce{String::plus}
        }
        throw RuntimeException("Something went wrong")
    }
n
chb0kotlin: it.digest().map { "%02x".format(it) }.joinToString("")