aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.kt
diff options
context:
space:
mode:
authortchojnacki <tomaszchojnacki2001@gmail.com>2022-08-10 20:23:12 +0200
committertchojnacki <tomaszchojnacki2001@gmail.com>2022-08-10 20:23:12 +0200
commit5a4e32c427862238fd092cbc28be4622d1552a72 (patch)
tree0d2287ee959db394c5f7e78408dcd12443afbe88 /src/Utils.kt
parent0ccc05883df5a918c4096ef6983bde8a2312764b (diff)
downloadgleam_aoc2020-5a4e32c427862238fd092cbc28be4622d1552a72.tar.gz
gleam_aoc2020-5a4e32c427862238fd092cbc28be4622d1552a72.zip
Finish day 24
Diffstat (limited to 'src/Utils.kt')
-rw-r--r--src/Utils.kt9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/Utils.kt b/src/Utils.kt
index c0f4f61..e245554 100644
--- a/src/Utils.kt
+++ b/src/Utils.kt
@@ -1,6 +1,4 @@
import java.io.File
-import java.math.BigInteger
-import java.security.MessageDigest
/**
* Reads lines from the given input txt file.
@@ -52,10 +50,3 @@ fun parseToMap(input: List<String>): Map<Pos2D, Int> =
Pos2D(x, y) to char.toString().toInt()
}
}.toMap()
-
-/**
- * Converts string to md5 hash.
- * @receiver a string
- * @return md5 hash of receiver
- */
-fun String.md5(): String = BigInteger(1, MessageDigest.getInstance("MD5").digest(toByteArray())).toString(16)