MYCrypto+Cocoa.m
author snej@snej.local
Tue Apr 14 18:34:52 2009 -0700 (2009-04-14)
changeset 11 3568d5fd4b6a
child 14 3af1d1c0ceb5
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.
     1 //
     2 //  MYCrypto+Cocoa.m
     3 //  MYCrypto
     4 //
     5 //  Created by Jens Alfke on 4/10/09.
     6 //  Copyright 2009 Jens Alfke. All rights reserved.
     7 //
     8 
     9 #import "MYCrypto+Cocoa.h"
    10 #import "MYCrypto_Private.h"
    11 #import "MYIdentity.h"
    12 
    13 
    14 @implementation SFChooseIdentityPanel (MYCrypto)
    15 
    16 
    17 - (NSInteger)my_runModalForIdentities:(NSArray *)identities 
    18                               message:(NSString *)message
    19 {
    20     NSMutableArray *identityRefs = $marray();
    21     for (MYIdentity *ident in identities)
    22         [identityRefs addObject: (id)ident.identityRef];
    23     return [self runModalForIdentities: identityRefs message: message];
    24 }
    25 
    26 - (void)my_beginSheetForWindow:(NSWindow *)docWindow 
    27                  modalDelegate:(id)delegate 
    28                 didEndSelector:(SEL)didEndSelector
    29                    contextInfo:(void *)contextInfo 
    30                     identities:(NSArray *)identities 
    31                        message:(NSString *)message
    32 {
    33     NSMutableArray *identityRefs = $marray();
    34     for (MYIdentity *ident in identities)
    35         [identityRefs addObject: (id)ident.identityRef];
    36     [self beginSheetForWindow:docWindow 
    37                 modalDelegate:delegate 
    38                didEndSelector:didEndSelector
    39                   contextInfo:contextInfo 
    40                    identities:identityRefs
    41                       message:message];
    42 }
    43 
    44 - (MYIdentity*) my_identity {
    45     return [MYIdentity identityWithIdentityRef: [self identity]];
    46 }
    47 
    48 @end