EMKeychain : A Cocoa Keychain Wrapper
by Brian Amerige of Extendmac, LLC., 02/08/2011
http://extendmac.com/EMKeychain/
© Copyright 2011 Extendmac, LLC.  All Rights Reserved.

Purpose: To create a cocoa wrapper class (not a bloated framework) to proxy between your application and the unfortunately-carbon based keychain.

Current State: Usable in what I expect to be most simple application scenarios. See the class overview information below to verify that EMKeychain is the best fit for your project.

Requirements:
	▪	Link your application against the Carbon and Security frameworks in /System/Library.

Example Usage: 

Adding a generic keychain item

[EMGenericKeychainItem addGenericKeychainItemForService:@"SomeAppService" withUsername:@"Joe" password:@"supersecure!"];

Adding an internet keychain item

[EMInternetKeychainItem addInternetKeychainItemForServer:@"apple.com" withUsername:@"sjobs" password:@"magic" path:@"/httpdocs" port:21 protocol:kSecProtocolTypeFTP];

Note that the "protocol" asks for a SecProtocolType. 

Working with a keychain item

//Grab the keychain item.
EMInternetKeychainItem *keychainItem = [EMInternetKeychainItem internetKeychainItemForServer:@"apple.com" withUsername:@"sjobs" path:@"/httpdocs" port:21 protocol:kSecProtocolTypeFTP];

//Grab the password.
NSString *password = keychainItem.password;

//Change the username and password. (This automatically saves to keychain, etc.)
keychainItem.username = @"phil";
keychainItem.password = @"philsnewpassword";