Re: KCAddGenericPassword()
Re: KCAddGenericPassword()
- Subject: Re: KCAddGenericPassword()
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 27 Jan 2002 16:41:25 -0500 (EST)
KCAddGenericPassword() is still in Carbon as some of the Keychain APIs have been
refactored into the Core. You need to include the Carbon framework and the
appropriate header files-- can't remember which.
Grab the source for SSHPassKey from mosxland.sourceforge.net -- it uses
KCAddGenericPassword() to stuff ssh passwords into the keychain. It includes
some generic code to convert between C and Pascal strings and you should be able
to just copy/paste the code.
Someone responded with a code snippet that uses kcaddgenericpassword. That
works, but according to the Carbon documentation, kcaddgenericpassword and the
other APIs that take C strings have been deprecated.
Likely, the whole thing will be moved into the Core and will use CFString
references? Who knows...
b.bum
BTW: There is a lot of very useful functionality in the Core. Check it out.
There are all kinds of things that can be done via the lower level APIs that
can't be done via the high level Cocoa APIs. I know that a number of folks in
this forum are offended by that. Get over it. Low level APIs have always been
extremely useful and attempting to generalize everything into high level APIs is
often a waste of time. It isn't that hard to call into the lower level APIs and
they provide for a granularity of control that is NOT appropriate within the
higher level APIs.