ideawu / Objective-C-RSA

Doing RSA encryption and decryption with Objective-C on iOS
http://www.ideawu.com/blog/post/132.html
Other
1.15k stars 280 forks source link

Encryption not working sporadically #7

Open jlubeck opened 8 years ago

jlubeck commented 8 years ago

Sometimes the code would return nil at this point:

on RSA.m line 150

if ((status != noErr) && (status != errSecDuplicateItem)) {
    return nil;
}

I'm getting a status -34018

Sometimes it works just fine. Others it doesn't. Always using the same Public Key. Why could that happen?