[PATCH] sha2: new header <sha2.h>
Mike Frysinger
vapier@gentoo.org
Sat Mar 28 06:41:00 GMT 2015
On 27 Mar 2015 14:39, Shawn Landden wrote:
> +/* Process the remaining bytes in the internal buffer and the usual
> + prolog according to the standard and write the result to RESBUF. */
two spaces after the period. please check the whole patch.
> +void *
> +__sha224_finish_ctx (sha256_ctx *ctx, void *resbuf)
> +{
> + __sha256_finish_ctx_generic (ctx);
>
> -void
> -__sha256_process_bytes (buffer, len, ctx)
> + /* Put result from CTX in first 28 bytes following RESBUF. */
> + for (unsigned int i = 0; i < 7; ++i)
> + put_be32 (((uint32_t *) resbuf) + i, ctx->H[i]);
erm, looks to me like resbuf is no longer void* ...
> +extern void *__sha256(const void *__restrict d, size_t n, void *__restrict md) {
incorrect style: no extern, and the brace goes on a sep line
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150328/6c8259dc/attachment.sig>
More information about the Libc-alpha
mailing list