summaryrefslogtreecommitdiff
path: root/src/include/gnunet_crypto_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_crypto_lib.h')
-rw-r--r--src/include/gnunet_crypto_lib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 77b4d0452..23caade12 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -403,6 +403,19 @@ GNUNET_CRYPTO_seed_weak_random (int32_t seed);
/**
+ * @ingroup hash
+ * Calculate the checksum of a buffer in one step.
+ *
+ * @param buf buffer to calculate CRC over
+ * @param len number of bytes in @a buf
+ * @return crc8 value
+ */
+uint8_t
+GNUNET_CRYPTO_crc8_n (const void *buf,
+ size_t len);
+
+
+/**
* Perform an incremental step in a CRC16 (for TCP/IP) calculation.
*
* @param sum current sum, initially 0
@@ -439,6 +452,8 @@ GNUNET_CRYPTO_crc16_n (const void *buf,
size_t len);
+
+
/**
* @ingroup hash
* Compute the CRC32 checksum for the first len