Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

forrestxu

macrumors newbie
Original poster
May 31, 2008
16
0
Hi,

I need your help.

I am new to IPhone Programming. I produced rsa public key and private key using the code below:

NSMutableDictionary *myDictionary=[[NSMutableDictionary alloc] init];
[myDictionary setObject:(id)kSecAttrKeyTypeRSA forKey:(id)kSecAttrKeyType];
[myDictionary setObject:mad:"512" forKey:(id)kSecAttrKeySizeInBits];
SecKeyGeneratePair((CFDictionaryRef) myDictionary, &publicKey, &privateKey);

How do I store privateKey into iphone? save it as a file? how to distribute the publicKey. send it by a file?


Thank you in advance.

Forrest
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.