title: Wipe NSData contents in Swift
body: <p>I have an NSData object that will contain sensitive data.  When the operation is complete, I would like to wipe the memory to avoid any potential security issues.  In Objective-C, this is easy.  I can just call...</p>
  
  <pre><code>memset([mySensitiveData bytes], 0, [mySensitiveData length]);
  </code></pre>
  
  <p>In Swift, however, it is not as straightforward.  I tried the equivalent...</p>
  
  <pre><code>memset(mySensitiveData.bytes, 0, mySensitiveData.length)
  </code></pre>
  
  <p>...however, I get a compiler error saying...</p>
  
  <pre><code>'UnsafePointer&lt;Void&gt;' is not convertible to 'UnsafeMutablePointer&lt;Void&gt;'
  </code></pre>
  
  <p>Any idea how to get around this and wipe the memory safely in Swift?  Thanks!!</p>