Quote:
Originally Posted by Arrie
we must use a prefix zero if the secret datapacket is smaller then 16(dec) or F(hex), is this correct ?
|
Actually smaller than 16(dec) = 10(hex). As the conversion from hex back to bytes assumes each byte is represented by a 2 character hex number then the original byte to hex must make sure that each bytes maps to a 2 character hex number. The library only produces a single hex character for values less than 16 so the "0" needs to be added to make it 2 characters.
Quote:
And if so is this than a bug or just stupid programming from me
|
Neither, just a "feature" of the library you didn't know about.