我对此代码有些疑问:
import UIKit
import Foundation
import CryptoSwift
class StartViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let key = "bbC2H19lkVbQDfakxcrtCCQdd0FloLyw"
let iv = "gqLOHUioQ0QjhusP"
let s = "my test string"
do {
let data = s.data(using: .utf8)
let enc = try AES(key:key,iv:iv,blockMode:.CBC,padding:PKCS7())
let encData = NSData(bytes:enc,length:Int(enc.count))
} catch {
print("error")
}
}
现在告诉我这个错误:
Cannot convert value of type 'AES' to expected argument type 'UnsafeRawPointer?'