title: Cannot convert value of type 'Int' to expected argument type '[CChar]' (aka 'Array<Int8>')
body: <p>I converted an Objective-C snippet to Swift as I am migrating to Swift. I am still new to Objective-C and I have average knowledge in Swift. Having problem satisfying the argument C char trying to convert from Int8 into C Char.</p>
  
  <pre><code>class func computeSHA256Digest(for input: String?) -&gt; String? {
      let cstr = Int8(input?.cString(using: .utf8) ?? 0)
      /* the rest of code */
  }
  </code></pre>
  
  <blockquote>
    <p>Cannot convert value of type 'Int' to expected argument type '[CChar]' (aka Array)</p>
  </blockquote>