bug-gnulib
[Top][All Lists]
Advanced

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

Re: FYI, new sha256 and sha512 modules in coreutils


From: Jim Meyering
Subject: Re: FYI, new sha256 and sha512 modules in coreutils
Date: Mon, 03 Mar 2008 08:34:50 +0100

Simon Josefsson <address@hidden> wrote:

> Jim Meyering <address@hidden> writes:
>
>> FYI, I've just created the sha256 and sha512 modules and
>> moved the remaining sha*-related files from coreutils/{lib,m4}
>> into coreutils/gl/{lib,m4}.
>>
>>     http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=f33599c1441
>
> Looks fine.  Would you consider adding define's for the digest size in
> the *.h files?  Something like:
>
> #define SHA256_DIGEST_SIZE 32
>
> #define SHA384_DIGEST_SIZE 48
>
> #define SHA512_DIGEST_SIZE 64
>
> The define's are useful when declaring local variables statically to
> hold the output digest.

Sure.  Please send a patch.
SHA224, too, I suppose?
I have a preference for using enum symbols, if that works for you.

enum { SHA512_DIGEST_SIZE = 64 };

> The u64.h file looks quite useful, we do something similar but ad-hoc in
> gnutls, so I would welcome adding it to gnulib.

Thank Paul Eggert :-)




reply via email to

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