Just updated to the latest Xcode 6.3 Beta 4 and I'm getting an error I cannot seem to figure out.
There error is:
Cannot invoke 'CCCrypt' with an argument list of type '(CCOperation, CCAlgorithm, CCOptions, UnsafePointer, (Int), nil, UnsafePointer, UInt, UnsafeMutablePointer, (Int), inout UInt)'
With the following code:
let keyBytes = UnsafePointer<UInt8>(keyData.bytes)
let keyLength = size_t(kCCKeySizeAES128)
let dataLength = UInt(self.length)
let dataBytes = UnsafePointer<UInt8>(self.bytes)
let bufferData:NSMutableData! = NSMutableData(length:Int(dataLength) + kCCBlockSizeAES128)
var bufferPointer = UnsafeMutablePointer<UInt8>(bufferData.mutableBytes)
let bufferLength = size_t(bufferData.length)
let operation: CCOperation = UInt32(kCCEncrypt)
let algoritm: CCAlgorithm = UInt32(kCCAlgorithmAES128)
let options: CCOptions = UInt32(kCCOptionECBMode)
var numBytesEncrypted: UInt = 0
var cryptStatus = CCCrypt(operation,
algoritm,
options,
keyBytes,
keyLength,
nil,
dataBytes,
dataLength,
bufferPointer,
bufferLength,
&numBytesEncrypted)
This was working great under Beta 3 and not sure what has changed, even after reading the Beta 4 change log.
Not sure what the issue is, should I open a bug with Apple?