Get string md5 in Swift 5 : <p>In Swift 4 we could use</p>

<pre><code>var md5: String? {
    guard let data = self.data(using: .utf8) else { return nil }
    let hash = data.withUnsafeBytes { (bytes: UnsafePointer&lt;Data&gt;) -&gt; [UInt8] in
        var hash: [UInt8] = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
        CC_MD5(bytes, CC_LONG(data.count), &amp;hash)
        return hash
    }
    return hash.map { String(format: "%02x", $0) }.joined()
}
</code></pre>

<p>But in Swift 5 <code>withUnsafeBytes</code> uses <code>UnsafeRawBufferPointer</code> instead of <code>UnsafePointer</code>. How to change md5 function?</p>
