changeset 39333:76337599254f

af_alg: Improve comments. * lib/af_alg.h: Use imperatives and tighten up wording.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 05 May 2018 18:46:01 -0700
parents fb89ae03b420
children 0467d34718aa
files ChangeLog lib/af_alg.h
diffstat 2 files changed, 14 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun May 06 02:39:38 2018 +0200
+++ b/ChangeLog	Sat May 05 18:46:01 2018 -0700
@@ -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.
--- a/lib/af_alg.h	Sun May 06 02:39:38 2018 +0200
+++ b/lib/af_alg.h	Sat May 05 18:46:01 2018 -0700
@@ -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 @@
 
 # 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 @@
       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);