Created
March 17, 2021 01:15
-
-
Save DjangoLC/d00328ca87187e195a087e453677c6b5 to your computer and use it in GitHub Desktop.
md5 method kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun md5(input:String): String { | |
val md = MessageDigest.getInstance("MD5") | |
return BigInteger(1, md.digest(input.toByteArray())).toString(16).padStart(32, '0') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment