MYKeychainItem.h
author snej@snej.local
Tue Apr 14 18:34:52 2009 -0700 (2009-04-14)
changeset 11 3568d5fd4b6a
parent 1 60e4cbbb5128
child 26 d9c2a06d4e4e
permissions -rw-r--r--
* The build process runs Doxygen only if it's installed (i.e. on the shell search path).
* Added instructions to the README on setting up a named Source Tree for MYUtilities.
* Changed the RSA key size in MYCryptoTest to 2048 and made it a named constant.
snej@0
     1
//
snej@0
     2
//  MYKeychainItem.h
snej@0
     3
//  MYCrypto
snej@0
     4
//
snej@0
     5
//  Created by Jens Alfke on 3/26/09.
snej@0
     6
//  Copyright 2009 Jens Alfke. All rights reserved.
snej@0
     7
//
snej@0
     8
snej@0
     9
#import <Foundation/Foundation.h>
snej@0
    10
#import <Security/Security.h>
snej@2
    11
#import "MYCryptoConfig.h"
snej@0
    12
@class MYKeychain;
snej@0
    13
snej@1
    14
snej@1
    15
/** Error domain for CSSM (low-level crypto) errors */
snej@1
    16
extern NSString* const MYCSSMErrorDomain;
snej@1
    17
snej@1
    18
snej@2
    19
#if MYCRYPTO_USE_IPHONE_API
snej@0
    20
typedef CFTypeRef MYKeychainItemRef;
snej@0
    21
#else
snej@0
    22
typedef SecKeychainItemRef MYKeychainItemRef;
snej@0
    23
#endif
snej@0
    24
snej@0
    25
snej@1
    26
/** Abstract base class for keychain items.
snej@1
    27
    Direct subclasses are MYKey and MYCertificate. */
snej@0
    28
@interface MYKeychainItem : NSObject
snej@0
    29
{
snej@0
    30
    @private
snej@0
    31
    MYKeychainItemRef _itemRef;
snej@0
    32
}
snej@0
    33
snej@1
    34
/** The Keychain item reference that this object represents. */
snej@0
    35
@property (readonly) MYKeychainItemRef keychainItemRef;
snej@0
    36
snej@1
    37
/** The Keychain that contains this object, or nil. */
snej@0
    38
@property (readonly) MYKeychain *keychain;
snej@0
    39
snej@0
    40
/** Removes the item from its keychain, if any. */
snej@0
    41
- (BOOL) removeFromKeychain;
snej@0
    42
snej@0
    43
@end