1. icyspider
  2. MYCrypto


MYCrypto / MYKeychainItem.h

//  MYKeychainItem.h
//  MYCrypto
//  Created by Jens Alfke on 3/26/09.
//  Copyright 2009 Jens Alfke. All rights reserved.

#import <Foundation/Foundation.h>
#import <Security/Security.h>
#import "MYCryptoConfig.h"
@class MYKeychain;

/** Error domain for CSSM (low-level crypto) errors */
extern NSString* const MYCSSMErrorDomain;

typedef CFTypeRef MYKeychainItemRef;
typedef SecKeychainItemRef MYKeychainItemRef;

/** Abstract base class for keychain items.
    Direct subclasses are MYKey and MYCertificate. */
@interface MYKeychainItem : NSObject
    MYKeychainItemRef _itemRef;
    BOOL _isPersistent;

/** The Keychain item reference that this object represents. */
@property (readonly) MYKeychainItemRef keychainItemRef;

/** The Keychain that contains this object, or nil. */
@property (readonly) MYKeychain *keychain;

/** Removes the item from its keychain, if any. */
- (BOOL) removeFromKeychain;

@property BOOL isPersistent;