bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hmac-md5


From: Bruno Haible
Subject: Re: hmac-md5
Date: Fri, 7 Oct 2005 15:32:09 +0200
User-agent: KMail/1.5

Simon Josefsson wrote:
> > Yes, I try to avoid 'unsigned char *' for that reason'.  ...
>
> Then perhaps hmac-md5 should use 'char*'.

The big downsides of 'char *' are:

  - It is not closer to the meaning of the data than 'void *'.
    The hmac-md5 module considers all bytes as unsigned values. Giving
    a prototypes that presents the bytes are string elements doesn't
    help.

  - It is unportable.
    For example, the hash function for strings in .mo files in glibc
    was taking a 'const char *' as argument and not casting the elements
    to 'unsigned char' - and it led to portability problems.

> I think I'll leave it as 'void*' for now

Agreed.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]