How do I encode an unmanaged<SecKey> to base64 to send to another server?
问题 I'm trying to use key pair encryption to validate identity between my app and my PHP server. To do this I need to send the public key over to the server after I generate it in my app. if let pubKey = NSData(base64EncodedData: publicKey, options: NSDataBase64DecodingOptions.allZeros)! { println(pubKey) } publicKey is of type Unmanaged<SecKey> . The error I'm getting in the above code is: Extra argument 'base64EncodedData' in call How would I do this? Is there a better way? Edit: This is how