[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hmac-md5
From: |
Simon Josefsson |
Subject: |
Re: hmac-md5 |
Date: |
Thu, 06 Oct 2005 13:29:03 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
Paul Eggert <address@hidden> writes:
> Simon Josefsson <address@hidden> writes:
>
>> Has anyone used md5_buffer from the md5 module on a platform with char
>> that is larger than 1 byte?
>
> Do you mean a host where UCHAR_MAX > 255? I doubt whether anyone has
> done that. POSIX requires that UCHAR_MAX == 255. A small fraction of
> GNU code is portable to hosts where UCHAR_MAX > 255, but usually this
> is more for the amusement of the author than anything else.
>
> If you meant sizeof (char) > 1, then I really doubt whether anyone has
> done that. C has required that sizeof (char) == 1 for ages.
Ok, then perhaps 'char*' is better than 'void*' for hmac-md5. When I
think more about it, also the encoding of the bytes inside 'char*'
matter. Is there a portability requirement that 'char foo = 0xAA' end
up with 10101010 in the memory buffer (void*)&foo? I think we need
that assumption since the md5 module uses 'void*'.
I'm not sure about 'unsigned char*'. Using 'unsigned char*' usually
lead to plenty of signed/unsigned warnings sooner or later. If we
make the code work regardless of whether 'char'=='unsigned char' or
'char'=='signed char', do we really have to specify 'unsigned char*'
in the API? Perhaps 'char*' leads to less problems.
I never realize how little I know until I start to do things..
Thanks,
Simon
- hmac-md5, Simon Josefsson, 2005/10/05
- Re: [bug-gnulib] hmac-md5, Bruno Haible, 2005/10/05
- Re: hmac-md5, Simon Josefsson, 2005/10/05
- Re: hmac-md5, Simon Josefsson, 2005/10/05
- Re: stdint license, Bruno Haible, 2005/10/05
- Re: stdint license, Simon Josefsson, 2005/10/05
- Re: stdint license, Oskar Liljeblad, 2005/10/06
- Re: hmac-md5, Paul Eggert, 2005/10/05
- Re: hmac-md5,
Simon Josefsson <=
- Re: hmac-md5, Paul Eggert, 2005/10/06
- Re: hmac-md5, Simon Josefsson, 2005/10/07
- Re: hmac-md5, Bruno Haible, 2005/10/07
- Re: hmac-md5, Simon Josefsson, 2005/10/06