Operation between array of bytes and NSData

// From [UInt8] to NSData let originalArray = [UInt8](arrayLiteral: 0xab, 0x12, 0x23) let data = NSData(bytes: originalArray, length: originalArray.count) // From NSData to [UInt8] var copyArray = [UInt8](count: data.length, repeatedValue: 0) data.getBytes(&copyArray, length: data.length)

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.