aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man/libkeccak_shakesum_fd.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-02-10 15:46:21 +0100
committerMattias Andrée <maandree@kth.se>2017-02-10 15:46:21 +0100
commit82afa682cfaaa09c3564299fc9f709e80081c661 (patch)
tree572c313ddc8f219a1c5fcd18b7b59633256fca0a /doc/man/libkeccak_shakesum_fd.3
parentbump year and change e-mail (diff)
downloadlibkeccak-82afa682cfaaa09c3564299fc9f709e80081c661.tar.gz
libkeccak-82afa682cfaaa09c3564299fc9f709e80081c661.tar.bz2
libkeccak-82afa682cfaaa09c3564299fc9f709e80081c661.tar.xz
Work on man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--doc/man/libkeccak_shakesum_fd.366
1 files changed, 41 insertions, 25 deletions
diff --git a/doc/man/libkeccak_shakesum_fd.3 b/doc/man/libkeccak_shakesum_fd.3
index 21c3ced..0d89f39 100644
--- a/doc/man/libkeccak_shakesum_fd.3
+++ b/doc/man/libkeccak_shakesum_fd.3
@@ -1,4 +1,4 @@
-.TH LIBKECCAK_SHAKESUM_FD 3 LIBKECCAK-%VERSION%
+.TH LIBKECCAK_SHAKESUM_FD 3 LIBKECCAK
.SH NAME
libkeccak_shakesum_fd - Calculate a SHAKE hashsum of a file
.SH SYNOPSIS
@@ -6,41 +6,58 @@ libkeccak_shakesum_fd - Calculate a SHAKE hashsum of a file
.nf
#include <libkeccak.h>
.P
-int libkeccak_shakesum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
- long \fIsemicapacity\fP, long \fIoutput\fP,
- char *\fIhashsum\fP);
+int
+libkeccak_shakesum_fd(int \fIfd\fP, libkeccak_state_t *\fIstate\fP,
+ long int \fIsemicapacity\fP, long int \fIoutput\fP,
+ char *\fIhashsum\fP);
.fi
.P
-Link with \fI-lkeccak\fP.
+Link with
+.IR -lkeccak .
.SH DESCRIPTION
The
.BR libkeccak_shakesum_fd ()
-function calculates a SHAKE hashsum of a file, whose file desriptor is
-specified by \fIfd\fP (and should be at the beginning of the file.)
-The hash algorithm is tuned by the \fIsemicapacity\fP and \fIoutput\fP
-parameters; they specify the half of the capacity and the output size,
-respectively, in bits.
+function calculates a SHAKE hashsum of a file, whose file
+desriptor is specified by
+.I fd
+(and should be at the beginning of the file.) The hash
+algorithm is tuned by the
+.I semicapacity
+and
+.I output
+parameters; they specify the half of the capacity and the
+output size, respectively, in bits.
.PP
-The hash is stored in binary form to \fIhashsum\fP. \fIhashsum\fP
+The hash is stored in binary form to
+.IR hashsum .
+.I hashsum
should have an allocation size of at least
-(((\fIoutput\fP + 7) / 8) * sizeof(char)).
+.RI ((( output
++ 7) / 8) * sizeof(char)).
.PP
-\fI*state\fP should not be initialised.
+.I *state
+should not be initialised.
.BR libkeccak_shakesum_fd ()
-initialises \fI*state\fP itself. Therefore there would be a
-memory leak if \fI*state\fP is already initialised.
+initialises
+.I *state
+itself. Therefore there would be a memory leak if
+.I *state
+is already initialised.
.SH RETURN VALUES
The
.BR libkeccak_shakesum_fd ()
function returns 0 upon successful completion.
-On error, -1 is returned and \fIerrno\fP is set to describe
-the error.
+On error, -1 is returned and
+.I errno
+is set to describe the error.
.SH ERRORS
The
.BR libkeccak_shakesum_fd ()
-function may fail for any reason, except those resulting
-in \fIerrno\fP being set to \fBEINTR\fP, specified for the
-functions
+function may fail for any reason, except those resulting in
+.I errno
+being set to
+.BR EINTR ,
+specified for the functions
.BR read (2),
.BR malloc (3),
and
@@ -59,8 +76,10 @@ hashing as this could limit what you can do, and make
the library more complex.
.PP
.BR libkeccak_shakesum_fd ()
-does not stop if interrupted (\fBread\fP(2) returns
-\fBEINTR\fP.)
+does not stop if interrupted
+.RB ( read (2)
+returns
+.BR EINTR .)
.PP
.BR libkeccak_shakesum_fd ()
assumes all information is non-sensitive, and will
@@ -91,9 +110,6 @@ libkeccak_state_destroy(&state);
.BR libkeccak_spec_check (3),
.BR libkeccak_generalised_spec_initialise (3),
.BR libkeccak_state_initialise (3)
-.SH AUTHORS
-Principal author, Mattias Andrée. See the LICENSE file for the full
-list of authors.
.SH BUGS
Please report bugs to https://github.com/maandree/libkeccak/issues or to
maandree@kth.se