1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

Debug md5.

This commit is contained in:
Cedric Beust 2015-12-23 20:30:53 +04:00
parent 121008f379
commit 82d6faa54f

View file

@ -8,6 +8,13 @@ import javax.xml.bind.DatatypeConverter
public class Md5 {
companion object {
// private fun md5(file: File) : String {
// val md5 = MessageDigest.getInstance("MD5")
// val bytes = file.readBytes()
// md5.update(bytes, 0, bytes.size)
// return DatatypeConverter.printHexBinary(md5.digest()).toLowerCase()
// }
fun toMd5Directories(directories: List<File>) : String {
MessageDigest.getInstance("MD5").let { md5 ->
directories.forEach { file ->