[Fwd: Re: Using linux cryptographic api in busybox]

yuen at klacno.sk yuen at klacno.sk
Mon May 9 21:16:00 UTC 2011


--------------------------- Pôvodná správa ----------------------------
Predmet: Re: Using linux cryptographic api in busybox
Od:      yuen at klacno.sk
Dátum:  Pon, Máj 9, 2011 11:12 pm
Komu:    "Rich Felker" <dalias at aerifal.cx>
--------------------------------------------------------------------------

> On Mon, May 09, 2011 at 09:58:05PM +0200, yuen at klacno.sk wrote:
>> const char *alg[] = {
>> 	"md5",
>> 	"sha1",
>> 	"sha224",
>> 	"sha256",
>> 	"sha384",
>> 	"sha512"
>> };
>
> This is a very bloated way of doing strings. Note that the pointer
> table is not even const! At least use "const char *const alg[]" but
> even better would be "const char alg[][7]" or a one-dimensional array
> of chars "md5\0sha1\0sha224\0sha256\0sha384\0sha512".
>
> Rich

Thank you for suggestion, but this is only sample not suited for busybox.
First I want to get some criticism if this is good idea before continue
porting.






More information about the busybox mailing list