I have BIGNUM structure from what contains really big positive integer. I'm converting this BIGNUM to array of bytes using BN_bn2bin function:
BIGNUM *bigInteger = ...
BN_bn2bin(bigInteger, bigIntegerBytes);
I noticed that bigIntegerBytes is in unsigned value representation. I would like to covert this integer from unsinged value representation to Two's complement representation. Can you tell me please how to do that?
PS. I'm using objective-c so maybe there is any way to do that using NSData.