I'd like to eliminate pointer-signedness warnings. I'm afraid some ugly
casts will have to be involved, since most functions work with uint8_t,
and at least test code needs to pass literal strings, of type char *.
I have one question, on the ascii-armor funtions: Would ie make sense
to change the type of ascii inputs and outputs to char? I.e.,
size_t
base64_encode_update(struct base64_encode_ctx *ctx,
- uint8_t *dst,
+ char *dst,
size_t length,
const uint8_t *src);
and similarly for all related functions. It would be an API change but
not an ABI change for any ABI spec I'm aware of. What do you think? So
the input to encoding is an octet string (uint8_t), and the output is a
string of plain char. And vice versa for decoding functions.
Also applies to the type arguments for sexp_iterator_check_type,
sexp_iterator_check_types and sexp_iterator_assoc, currently using
uint8_t. They are usually called with literal ascii strings, so it would
make some sense to type as char rather than uint8_t. (I don't think
these are used much by any application except lsh and libspki).
And no matter how things are typed, I wouldn't expect nettle to work out
of the box on platforms where char and uint8_t are of different size, or
where string literals use a non-asciii character set.
Regards,
/Niels
--
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.