存储Wifi密码

时间:2015-04-03 04:59:10

标签: passwords wifi keychain

有没有办法检索目标C中存储在钥匙串中的wifi密码?我找不到这个解决方案的答案。请帮帮我。

1 个答案:

答案 0 :(得分:0)

无线网络密码存储在系统密钥链中(或登录密钥链,具体取决于操作系统版本) - 这是一个堆栈交换问题:https://apple.stackexchange.com/questions/56130/how-to-find-wifi-password-on-my-mac-which-is-already-connected

从ObjectiveC,您可以使用Apple提供的API访问钥匙串:https://developer.apple.com/library/mac/documentation/Security/Reference/keychainservices/index.html。特别是对于您的任务,我建议使用https://developer.apple.com/library/mac/documentation/Security/Reference/keychainservices/index.html#//apple_ref/c/func/SecKeychainFindGenericPassword功能。