无法根据数据创建SECKEY

时间:2019-09-25 13:15:27

标签: ios swift elliptic-curve seckeyref

我从蓝牙连接获取数据。获取数据后,我需要将此数据更改为SECKEY类型。但是我没有。

let attributes: [String: Any] = [kSecAttrKeySizeInBits as String: 192,
                                       kSecAttrKeyType as String: kSecAttrKeyTypeEC]
let data: CFData = Data(hex: "A60B941DF1DC6886B68B9F6E357C91330741300FA9E2CAA56743C63B550959370741300FA9E2CAA56743C63B55095937") as CFData
let publicKey2 = SecKeyCreateWithData(data, attributes as CFDictionary, &error)

0 个答案:

没有答案