2010-09-20 19:44:17 -05:00
|
|
|
//
|
|
|
|
// MGMKeychain.h
|
|
|
|
// MGMUsers
|
|
|
|
//
|
|
|
|
// Created by Mr. Gecko on 4/3/10.
|
2011-02-24 11:24:19 -06:00
|
|
|
// Copyright (c) 2011 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
2010-09-20 19:44:17 -05:00
|
|
|
//
|
|
|
|
|
2011-03-07 19:02:53 -06:00
|
|
|
#import <Foundation/Foundation.h>
|
2010-09-20 19:44:17 -05:00
|
|
|
#import <Security/Security.h>
|
|
|
|
|
|
|
|
@class MGMKeychainItem;
|
|
|
|
|
2010-09-24 12:46:38 -05:00
|
|
|
#if TARGET_OS_IPHONE
|
|
|
|
typedef enum {
|
|
|
|
kSecGenericPasswordItemClass,
|
|
|
|
kSecInternetPasswordItemClass,
|
|
|
|
kSecCertificateItemClass
|
|
|
|
} SecItemClass;
|
|
|
|
#endif
|
|
|
|
|
2010-09-20 19:44:17 -05:00
|
|
|
@interface MGMKeychain : NSObject {
|
|
|
|
|
|
|
|
}
|
|
|
|
+ (BOOL)itemExists:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount;
|
|
|
|
+ (BOOL)itemExists:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount itemClass:(SecItemClass)theClass;
|
|
|
|
+ (NSArray *)items:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount;
|
|
|
|
+ (NSArray *)items:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount itemClass:(SecItemClass)theClass;
|
|
|
|
+ (MGMKeychainItem *)addItem:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount password:(NSString *)thePassword;
|
|
|
|
+ (MGMKeychainItem *)addItem:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount password:(NSString *)thePassword itemClass:(SecItemClass)theClass;
|
|
|
|
@end
|