If I create a new NSData object of a specific size using dataWithBytes:length:, what is the most efficient way to create the input bytes (20 Mb worth) of random characters, pref
import Security
func randomBytes(length: Int) -> Data {
var data = Data(capacity: length)
data.withUnsafeMutableBytes { (bytes: UnsafeMutablePointer) -> Void in
let _ = SecRandomCopyBytes(kSecRandomDefault, length, bytes)
}
return data
}