Closed Aleph72 closed 8 years ago
[MIHRSAPrivateKey dataValue]
and [MIHRSAPublicKey dataValue]
just return an NSData
instance which can be used to rebuild the key via [MIHRSAPrivateKey initWithData:]
and [MIHRSAPublicKey initWithData:]
. Everything else is up to you and without more details(/code) I can't help you any further.
Never mind, I've finally been able to save it to the Keychain.
No problem. Hope you will find MIHCrypto useful.
Hello, I'm trying to use MIHCrypto and so far seems good for me. The only problem I'm having right now is saving the key pair somewhere. In my app I'm using an encrypted database, so my first thinking was saving there the keys. No problems with the public key, but when I try to save the private key it just does not work. I'm trying to save the 'privateKey.dataValue' to the DB but for some reasons it doesn't work. I've tried to save it as [NSKeyedArchiver archivedDataWithRootObject:privateKey] or [NSKeyedArchiver archivedDataWithRootObject:privateKey.dataValue], both with no success. the DB column type is blob. Any help would be greatly appreciated. Thanks.