Objective-C-RSA icon indicating copy to clipboard operation
Objective-C-RSA copied to clipboard

Can not decrypt

Open veila opened this issue 7 years ago • 3 comments

I created public key and private key by command line like in website https://rietta.com/blog/2012/01/27/openssl-generating-rsa-key-from-command/ It encrypt with public key very good but decWithPrivKey always empty. Pls help me. Tks

veila avatar Apr 18 '17 03:04 veila

I encountered the same problem. Who knows the reason? help me, thank you

NineCity avatar Apr 22 '18 11:04 NineCity

If encryption was good then normally you are good. Wierd result usually comes from env or security settings. I suggest you post your code along with your keys (if they are just temp keys, nothing sensitive) and info of your development env (Xcode version, Mac version, Emulator version, etc).

Cheers,

btnguyen2k avatar Apr 22 '18 12:04 btnguyen2k

solved, follow the solution you provided: comment "data = [RSA stripPrivateKeyHeader:data];". Thanks a lot for your answer. 👍

dunno7 avatar Aug 07 '22 07:08 dunno7