Skip to content

Instantly share code, notes, and snippets.

@kgreenek
Created December 30, 2014 21:02
Show Gist options
  • Save kgreenek/f391ab29f300d2622c93 to your computer and use it in GitHub Desktop.
Save kgreenek/f391ab29f300d2622c93 to your computer and use it in GitHub Desktop.
public class SecureData: NSMutableData {
public class func secureDataWithLength(length: Int) -> SecureData? {
if let data = CFDataCreateMutable(SecureMemoryAllocator.allocator, length) as? SecureData {
data.length = length
return data
}
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment