Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/MD5/Kotlin/md5.kotlin
Normal file
12
Task/MD5/Kotlin/md5.kotlin
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// version 1.0.6
|
||||
|
||||
import java.security.MessageDigest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val text = "The quick brown fox jumped over the lazy dog's back"
|
||||
val bytes = text.toByteArray()
|
||||
val md = MessageDigest.getInstance("MD5")
|
||||
val digest = md.digest(bytes)
|
||||
for (byte in digest) print("%02x".format(byte))
|
||||
println()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue