From: "Martin Boßlet" Date: 2012-03-17T04:17:20+09:00 Subject: Re: Converting Bignum into bytes Hi Victor, > Hi Martin, > > Thank you for your answer. I also thought of this solution, but a little bit > the other way around, like this: Oops, yes, that's what I actually meant, otherwise you get the bytes of the hex string :) > The base 16 length representation of big is 31 whereas the unpacked string > is 32 bytes. > I wonder is this a bug? No, it's not a bug, it's just that hex mandates an even number of characters, whereas the textual representation of a number doesn't - but padding appropriately to get an even number of characters like you mentioned solves the issue. Regards, Martin