]> Savannah Git Hosting - gnulib.git/commitdiff
af_alg: Improve comments.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 May 2018 01:46:01 +0000 (18:46 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 May 2018 01:47:05 +0000 (18:47 -0700)
* lib/af_alg.h: Use imperatives and tighten up wording.

ChangeLog
lib/af_alg.h

index 8230d84700371abdb10abd963d1b32c526c4b4db..7f1f5b032f35fd174a04e53d86616729763b58a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       af_alg: Improve comments.
+       * lib/af_alg.h: Use imperatives and tighten up wording.
+
 2018-05-05  Bruno Haible  <bruno@clisp.org>
 
        af_alg: Improve comments.
index 295f0f9b599838eaf498802e689f26ee93110d0b..2545ec6ec213fd794dbb51c3650d0d8f7796de7e 100644 (file)
@@ -1,5 +1,4 @@
-/* af_alg.h - Declaration of functions to compute message digest from
-   file streams using Linux kernel crypto API.
+/* af_alg.h - Compute message digests from file streams.
    Copyright (C) 2018 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
@@ -18,7 +17,7 @@
 /* Written by Matteo Croce <mcroce@redhat.com>, 2018.
    Documentation by Bruno Haible <bruno@clisp.org>, 2018.  */
 
-/* This file declares specific functions for computing message digests
+/* Declare specific functions for computing message digests
    using the Linux kernel crypto API, if available.  This kernel API gives
    access to specialized crypto instructions (that would also be available
    in user space) or to crypto devices (not directly available in user space).
@@ -38,13 +37,11 @@ extern "C" {
 
 # if HAVE_LINUX_IF_ALG_H
 
-/* Computes a message digest of the contents of a file.
-   STREAM is an open file stream.  Regular files are handled more efficiently
-   than other types of files.
-   ALG is the message digest algorithm.  The supported algorithms are listed in
-   the file /proc/crypto.
-   RESBLOCK points to a block of HASHLEN bytes, for the result. HASHLEN must be
-   the length of the message digest, in bytes, in particular:
+/* Compute a message digest of the contents of a file.
+   STREAM is an open file stream.  Regular files are handled more efficiently.
+   ALG is the message digest algorithm; see the file /proc/crypto.
+   RESBLOCK points to a block of HASHLEN bytes, for the result.
+   HASHLEN must be the length of the message digest, in bytes, in particular:
 
       alg    | hashlen
       -------+--------
@@ -55,8 +52,8 @@ extern "C" {
       sha384 | 48
       sha512 | 64
 
-   If successful, this function fills RESBLOCK and returns 0.
-   Upon failure, it returns a negated error code.  */
+   If successful, fill RESBLOCK and return 0.
+   Upon failure, return a negated error number.  */
 int
 afalg_stream (FILE *stream, const char *alg, void *resblock, ssize_t hashlen);