title: How to Generate an MD5 hash in Kotlin?
body: <p>Generate MD5 hash of a string using standard library in Kotlin?</p>
  <p>I have tried below mention code</p>
  <pre><code>import java.math.BigInteger
  import java.security.MessageDigest
  
  fun md5(input:String): String {
      val md = MessageDigest.getInstance(&quot;MD5&quot;)
      return BigInteger(1, md.digest(input.toByteArray())).toString(16).padStart(32, '0')
  }
  </code></pre>
  <p>Is this the best way or which?</p>