How to use “SecItemAdd” to store a symmetric key in OS X?
问题 I want to store a symmetric key in the keychain of OS X. I read by the Apple DevDocs that I should use SecItemAdd in order to do this. I also read the CryptoExercise without any solutions for Me. But when I'm doing so, I always got OSStatus errSecNoSuchAttr (-25303) . Codesnippet as follows: //Labels and app tags NSString *label = @"My Testkey"; NSData * peerTag = [[NSData alloc] initWithBytes:(const void *)[label UTF8String] length:[label length]]; // Generating testkey NSMutableData *key =