Open testower opened 9 years ago
You're right. Thats a bug caused by missing implementation of isEqual:
and hash
in MIHRSAPrivateKey
and MIHRSAPublicKey
. Thanks for pointing out. I'll fix this in the next release.
This report is from 2015, was this fixed?
I don't think so. As described in my comment from 2015 it would be easy to fix, by implementing isEqual:
and hash
methods, but I never did so. If you need this functionality, fastest way to get it into this library would be to implement it yourself and create a pull-request. Simplest possible solution for hash
would be to call dataValue
and create a hash of the returned string. For isEqual:
simple compare the individual parameters of the key.
I'm trying to create instances of MIHRSAPublicKey and MIHRSAPrivateKey using
initWithData:
after they have been encoded as strings from their data values, and decoded back into data values.See following code example. The asserts on data equality succeed but the asserts on key and keypair equality fail.
Not sure if this is a bug, or me misunderstanding the intended usage of these APIs. Would you be able to help?