[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shishi/lib nettle.c
From: |
shishi-commit |
Subject: |
shishi/lib nettle.c |
Date: |
Sat, 20 Sep 2003 07:09:07 -0400 |
CVSROOT: /cvsroot/shishi
Module name: shishi
Branch:
Changes by: Simon Josefsson <address@hidden> 03/09/20 07:09:07
Modified files:
lib : nettle.c
Log message:
Doc fix.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/nettle.c.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
Patches:
Index: shishi/lib/nettle.c
diff -u shishi/lib/nettle.c:1.12 shishi/lib/nettle.c:1.13
--- shishi/lib/nettle.c:1.12 Fri Sep 19 20:03:38 2003
+++ shishi/lib/nettle.c Sat Sep 20 07:09:07 2003
@@ -205,6 +205,22 @@
return crc;
}
+/**
+ * shishi_crc:
+ * @handle: shishi handle as allocated by shishi_init().
+ * @in: input character array of data to checksum.
+ * @inlen: length of input character array of data to checksum.
+ * @out: newly allocated character array with checksum of data.
+ *
+ * Compute checksum of data using CRC32 modified according to RFC
+ * 1510. The @out buffer must be deallocated by the caller.
+ *
+ * The modifications compared to standard CRC32 is that no initial and
+ * final XOR is performed, and that the output is returned in
+ * LSB-first order.
+ *
+ * Return value: Returns SHISHI_OK iff successful.
+ **/
int
shishi_crc (Shishi * handle, const char *in, size_t inlen, char *out[4])
{