We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent feb2331 commit f18c282Copy full SHA for f18c282
src/Utils.kt
@@ -10,4 +10,4 @@ fun readInput(name: String) = File("src", "$name.txt").readLines()
10
/**
11
* Converts string to md5 hash.
12
*/
13
-fun String.md5(): String = BigInteger(1, MessageDigest.getInstance("MD5").digest(toByteArray())).toString(16)
+fun String.md5(): String = BigInteger(1, MessageDigest.getInstance("MD5").digest(toByteArray())).toString(16).padStart(32, '0')
0 commit comments