dh question
Paul Crowley
paul at ciphergoth.org
Tue Jun 7 16:06:50 PDT 2005
Brad Fitzpatrick wrote:
> Which means it should be defined, right? The different times this comes
> up aren't purely implementor-only decisions... they affect the other
> party.
It's said "All integers are represented in big-endian signed two's
complement, Base64 encoded" for a while now...
> I'll go with 2's complement MSB, then, if you add it to the spec. Unless
> that's silly and we can ignore negative numbers.
It's kind-of silly, but it's a common format. At least I know of two
places where it's used - SPKI and Java. Perl doesn't seem to have a way
of converting between bytes and bigints.
> I'm concerned where people's libraries may do one thing vs. another for
> them and they might not have ways to change it? No clue.
Since they're always non-negative, our integers can always be
interpreted by something that's not expecting 2~. If we need to make
something 2~ we can do it by conditionally adding a zero byte to the
beginning if the high bit is set.
--
__
\/ o\ Paul Crowley, paul at ciphergoth.org
/\__/ http://www.ciphergoth.org/
More information about the yadis
mailing list