svn commit: trunk/uClibc/libcrypt
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Thu Jun 12 08:43:03 UTC 2008
> -----Original Message-----
> From: uclibc-cvs-bounces at uclibc.org [mailto:uclibc-cvs-
> bounces at uclibc.org] On Behalf Of vda at uclibc.org
> Sent: den 11 juni 2008 18:12
> To: uclibc-cvs at uclibc.org
> Subject: svn commit: trunk/uClibc/libcrypt
>
> Author: vda
> Date: 2008-06-11 09:11:29 -0700 (Wed, 11 Jun 2008)
> New Revision: 22296
>
> Log:
> libcrypt/md5.c:
> Make sp, ep and p variables automatic.
> There is no point in having them static,
> they never use their values retained from previous call.
> Replace strlen(__md5__magic) etc by compile-time constants.
>
> text data bss dec hex filename
> - 1957 0 132 2089 829 libcrypt/md5.o
> + 1905 0 120 2025 7e9 libcrypt/md5.o
>
>
>
> Modified:
> trunk/uClibc/libcrypt/md5.c
>
>
> Changeset:
> Modified: trunk/uClibc/libcrypt/md5.c
> ===================================================================
> --- trunk/uClibc/libcrypt/md5.c 2008-06-11 15:43:19 UTC (rev 22295)
> +++ trunk/uClibc/libcrypt/md5.c 2008-06-11 16:11:29 UTC (rev 22296)
> @@ -95,8 +95,11 @@
> static void __md5_Transform __P((u_int32_t [4], const unsigned char [64]));
>
>
> -static const unsigned char __md5__magic[] = "$1$"; /* This string is magic for this algorithm. Having
> - it this way, we can get better later on */
> +#define MD5_MAGIC_STR "$1$"
> +#define MD5_MAGIC_LEN (sizeof(MD5_MAGIC_STR) - 1)
> +static const unsigned char __md5__magic[] = MD5_MAGIC_STR;
Shouldn't the comment below be _before_ the string above (even
before the two defines I would say)? As it now stands at least
I read it as referring to __md5_itoa64, which I doubt was how
it was intended...
> +/* This string is magic for this algorithm. Having
> + * it this way, we can get better later on */
> static const unsigned char __md5_itoa64[] = /* 0 ... 63 => ascii - 64 */
> "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
//Peter
More information about the uClibc
mailing list