aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-24 01:05:44 +0200
committerMattias Andrée <maandree@kth.se>2024-08-24 01:05:44 +0200
commitcf0f05362e71c189b8052bbfddd2f270f907041e (patch)
tree371ba96e6d0cdda94a5ba0f07628b1d1ea0c5960 /libhashsum.h
parentFix makefile (diff)
downloadlibhashsum-cf0f05362e71c189b8052bbfddd2f270f907041e.tar.gz
libhashsum-cf0f05362e71c189b8052bbfddd2f270f907041e.tar.bz2
libhashsum-cf0f05362e71c189b8052bbfddd2f270f907041e.tar.xz
Standardise how to interpret a partial byte
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--libhashsum.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libhashsum.h b/libhashsum.h
index 5fb71cf..0bfb48a 100644
--- a/libhashsum.h
+++ b/libhashsum.h
@@ -315,6 +315,13 @@ struct libhashsum_hasher {
* Update the hash state given it's final
* input data
*
+ * Regardless of the algorithm's standard, the function
+ * will takes the lower bits from `data[bytes]`, if
+ * `extra_bits > 0` and use the for the additional bits;
+ * the least significant bit will be used as the first
+ * bit and the most significant bit will be used as the
+ * last bit
+ *
* @param this The object containing this function pointer
* @param data The new input data, the function may rewrite it's content
* @param bytes The number of bytes available in `data` for reading
@@ -333,6 +340,13 @@ struct libhashsum_hasher {
* Update the hash state given it's final
* input data
*
+ * Regardless of the algorithm's standard, the function
+ * will takes the lower bits from `data[bytes]`, if
+ * `extra_bits > 0` and use the for the additional bits;
+ * the least significant bit will be used as the first
+ * bit and the most significant bit will be used as the
+ * last bit
+ *
* @param this The object containing this function pointer
* @param data The new input data, the function may rewrite it's content
* @param bytes The number of bytes available in `data` for reading