hohl / MIHCrypto

OpenSSL wrapper for Objective-C [cryptography]
MIT License
340 stars 68 forks source link

Support for BigNumber #7

Closed krzyzanowskim closed 10 years ago

krzyzanowskim commented 10 years ago

I can't find it, is it wrapped already?

hohl commented 10 years ago

No it isn't wrapped yet. But I think it's important too. I've added it on the top of my ToDo list.

On 08.05.2014, at 02:31, Marcin Krzyzanowski notifications@github.com wrote:

I can't find it, is it wrapped already?

— Reply to this email directly or view it on GitHub.

hohl commented 10 years ago

Hope, I've covered all the important stuff. Feel free to rate the class interface design or to recommend any other enhancements.

I also decided to name the class MIHBigInteger since it describes it better what the class does. MIHBigNumber have been my first idea since it is already called BIGNUM in OpenSSL, but I thought this may cause confusion since NSNumber can store any kind of number and this class is only capable of storing any-size integers.

krzyzanowskim commented 10 years ago

thx.

krzyzanowskim commented 10 years ago

I would suggest use BN_clean_free in place of BN_free, it's allways better to have it cleaned this way I think. The same with malloc vs calloc, I suggest calloc (zeroing allocated memory).

Regards

hohl commented 10 years ago

Guess you're right. Especially when dealing with private keys or other sensitive data it would be better to get everything cleared before releasing the memory.