【发布时间】:2020-06-29 06:38:34
【问题描述】:
我正在尝试使用 RSA 加密字符串,我已经从服务器获得了一个 publicKey(String type)。 我如何在没有“SecKeyCreateWithData”的情况下获取 secKey,因为此方法仅支持 ios10+ ?但它必须支持到ios8.0+。
if #available(iOS 10.0, *) {
guard let secKey = SecKeyCreateWithData(data as CFData, attributes, &error) else {
print(error.debugDescription)
return nil
}
} else {
//how can I do here?
}
【问题讨论】:
标签: ios swift encryption rsa public-key-encryption