xcode 版本:9.3.1 (9E145)
斯威夫特版本:4.1
我刚刚下载了最新的主副本并使用 CocoaPods 安装了 CryptoSwift。使用 README 中给出的示例:
do {
// In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want.
let gcm = GCM(iv: iv, mode: .combined)
let aes = try AES(key: key, blockMode: gcm, padding: .noPadding)
let encrypted = try aes.encrypt(plaintext)
let tag = gcm.authenticationTag
catch {
// failed
}
我收到“使用未解析的标识符‘GCM’”的错误。我已经尝试过其他功能,例如 aes.encrypt 和 aes.decrypt,它们都可以正常工作