title: NumberFormatException in converting string to byte
body: <p>I am trying to get the MD5 format of string</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>fun getEncodedData(data: String): String? {
  
          val MD5 = "MD5"
  
          // Create MD5 Hash
          val digest = java.security.MessageDigest
              .getInstance(MD5)
  
          digest.update(data.toByte())
          val messageDigest = digest.digest()
  
          // Create Hex String
          val hexString = StringBuilder()
          for (aMessageDigest in messageDigest) {
              var h = Integer.toHexString(0xFF and aMessageDigest.toInt())
              while (h.length &lt; 2)
                  h = "0$h"
              hexString.append(h)
          }
          return hexString.toString()
      }
  </code></pre>
  
  <p><strong>There is a crash at:</strong>  <code>digest.update(data.toByte())</code>. I get number format Exception</p>
  
  <p><strong>Input I am passing for <code>data</code></strong>: <code>oEXm43</code></p>
  
  <p>There is no crash if I pass ex: <code>11</code> as a string for input <code>data</code></p>
  
  <p>Should the input always should be <code>integer</code> in the <code>string</code> or can it be a mixture of <code>number</code> and <code>characters</code>.</p>