Cocoa接口到MacOS X钥匙扣 [英] Cocoa interface to MacOS X Keychain

查看:108
本文介绍了Cocoa接口到MacOS X钥匙扣的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些Mac代码需要存储,访问和更新密码,以便通过Web API连接用户。放置此信息的正确位置应该是Mac Keychain,但似乎没有可靠界面(请参阅此答案) - 这是否仍然正确?

I've got a bit of Mac code that needs to store, access and update passwords in order to connect users with a web API. The right place to put this information should be the Mac Keychain, but there doesn't seem to be a cocoa interface (see this answer) -- is this still correct?

我看过苹果的 Keychain文档,并且API看起来令人难以置信的笨重。我可以存储到它并检索记录,但任何更复杂的似乎需要大量的思考,什么可能出错了(见此错误代码列表)。

I've looked at Apple's Keychain documentation, and the API seems incredibly clunky. I can store to it and retrieve records, but anything more complex seems to require a lot of thought as to what might go wrong (see this list of error codes).

有没有更好的接口,Mac的钥匙串,除了通过C代码?我最近来的是 EMKeychain ,但它似乎需要一些工作(例如除了吐痰之外没有错误处理代码

Is there a better interface to the Mac keychain, aside from slogging through the C code? The closest I've come is EMKeychain but it seems like it needs a bit of work (e.g. no error handling code aside from spitting to the console).

推荐答案

您应该查看 SSKeychain 。工作太棒了,真棒代码。

You should take a look at SSKeychain. Works great, awesome code.

这篇关于Cocoa接口到MacOS X钥匙扣的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆