aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-07 14:08:29 +0200
committerMattias Andrée <maandree@kth.se>2022-07-07 14:08:29 +0200
commit756128a662c619f47c27ef2ba228f96b9c63be29 (patch)
tree94c98676b4894d2a75f360267a0419af3c800231
parentInline some output size functions (diff)
downloadlibsha1-756128a662c619f47c27ef2ba228f96b9c63be29.tar.gz
libsha1-756128a662c619f47c27ef2ba228f96b9c63be29.tar.bz2
libsha1-756128a662c619f47c27ef2ba228f96b9c63be29.tar.xz
Remove documentation from .c files that already exist in .h files
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--algorithm_output_size.c6
-rw-r--r--behex_lower.c7
-rw-r--r--behex_upper.c7
-rw-r--r--digest.c8
-rw-r--r--hmac_digest.c14
-rw-r--r--hmac_init.c9
-rw-r--r--hmac_marshal.c7
-rw-r--r--hmac_state_output_size.c6
-rw-r--r--hmac_unmarshal.c8
-rw-r--r--hmac_update.c8
-rw-r--r--init.c7
-rw-r--r--process.c6
-rw-r--r--state_output_size.c6
-rw-r--r--sum_fd.c9
-rw-r--r--unhex.c8
-rw-r--r--unmarshal.c8
-rw-r--r--update.c7
17 files changed, 0 insertions, 131 deletions
diff --git a/algorithm_output_size.c b/algorithm_output_size.c
index c91c23d..5e0ce10 100644
--- a/algorithm_output_size.c
+++ b/algorithm_output_size.c
@@ -2,10 +2,4 @@
#include "common.h"
-/**
- * Get the output size of an algorithm
- *
- * @param algorithm The hashing algorithm
- * @return The number of bytes in the output, zero on error
- */
extern inline size_t libsha1_algorithm_output_size(enum libsha1_algorithm);
diff --git a/behex_lower.c b/behex_lower.c
index c69eaa0..301a8ca 100644
--- a/behex_lower.c
+++ b/behex_lower.c
@@ -2,13 +2,6 @@
#include "common.h"
-/**
- * Convert a binary hashsum to lower case hexadecimal representation
- *
- * @param output Output array, should have an allocation size of at least `2 * n + 1`
- * @param hashsum The hashsum to convert
- * @param n The size of `hashsum`
- */
void
libsha1_behex_lower(char *restrict output, const void *restrict hashsum_, size_t n)
{
diff --git a/behex_upper.c b/behex_upper.c
index 19fa317..877b38f 100644
--- a/behex_upper.c
+++ b/behex_upper.c
@@ -2,13 +2,6 @@
#include "common.h"
-/**
- * Convert a binary hashsum to upper case hexadecimal representation
- *
- * @param output Output array, should have an allocation size of at least `2 * n + 1`
- * @param hashsum The hashsum to convert
- * @param n The size of `hashsum`
- */
void
libsha1_behex_upper(char *restrict output, const void *restrict hashsum_, size_t n)
{
diff --git a/digest.c b/digest.c
index 06ceb10..0e9d117 100644
--- a/digest.c
+++ b/digest.c
@@ -2,14 +2,6 @@
#include "common.h"
-/**
- * Absorb the last part of the message and output a hash
- *
- * @param state The hashing state
- * @param message The message, in bits
- * @param msglen The length of the message, zero if there is nothing more to absorb
- * @param output The output buffer for the hash
- */
void
libsha1_digest(struct libsha1_state *restrict state, const void *message_, size_t msglen, void *output_)
{
diff --git a/hmac_digest.c b/hmac_digest.c
index 4647101..2df7d57 100644
--- a/hmac_digest.c
+++ b/hmac_digest.c
@@ -2,20 +2,6 @@
#include "common.h"
-/**
- * Feed data into the HMAC algorithm and
- * get the result
- *
- * The state of the algorithm will be reset and
- * `libsha1_hmac_update` and `libsha1_hmac_update`
- * can be called again
- *
- * @param state The state of the algorithm
- * @param data Data to feed into the algorithm
- * @param n The number of bytes to feed into the algorithm
- * @param output The output buffer for the hash, it will be as
- * large as for the underlaying hash algorithm
- */
void
libsha1_hmac_digest(struct libsha1_hmac_state *restrict state, const void *data, size_t n, void *output)
{
diff --git a/hmac_init.c b/hmac_init.c
index c16998a..954254b 100644
--- a/hmac_init.c
+++ b/hmac_init.c
@@ -2,15 +2,6 @@
#include "common.h"
-/**
- * Initialise an HMAC state
- *
- * @param state The state that should be initialised
- * @param algorithm The hashing algorithm
- * @param key The key
- * @param key_length The length of key, in bits
- * @return Zero on success, -1 on error
- */
int
libsha1_hmac_init(struct libsha1_hmac_state *restrict state, enum libsha1_algorithm algorithm,
const void *restrict key_, size_t keylen)
diff --git a/hmac_marshal.c b/hmac_marshal.c
index 95f4277..1febed2 100644
--- a/hmac_marshal.c
+++ b/hmac_marshal.c
@@ -2,13 +2,6 @@
#include "common.h"
-/**
- * Marshal an HMAC state into a buffer
- *
- * @param state The state to marshal
- * @param buf Output buffer, `NULL` to only return the required size
- * @return The number of bytes marshalled to `buf`
- */
size_t
libsha1_hmac_marshal(const struct libsha1_hmac_state *restrict state, void *restrict buf_)
{
diff --git a/hmac_state_output_size.c b/hmac_state_output_size.c
index 71be1b2..0a54742 100644
--- a/hmac_state_output_size.c
+++ b/hmac_state_output_size.c
@@ -2,10 +2,4 @@
#include "common.h"
-/**
- * Get the output size of the algorithm specified for a HMAC state
- *
- * @param state The state
- * @return The number of bytes in the output, zero on error
- */
extern inline size_t libsha1_hmac_state_output_size(const struct libsha1_hmac_state *restrict);
diff --git a/hmac_unmarshal.c b/hmac_unmarshal.c
index bd8f3fe..30e6f78 100644
--- a/hmac_unmarshal.c
+++ b/hmac_unmarshal.c
@@ -2,14 +2,6 @@
#include "common.h"
-/**
- * Unmarshal an HMAC state from a buffer
- *
- * @param state Output parameter for the unmarshalled state
- * @param buf The buffer from which the state shall be unmarshalled
- * @param bufsize The maximum number of bytes that can be unmarshalled
- * @return The number of read bytes, 0 on failure
- */
size_t
libsha1_hmac_unmarshal(struct libsha1_hmac_state *restrict state, const void *restrict buf_, size_t bufsize)
{
diff --git a/hmac_update.c b/hmac_update.c
index 160a293..5082480 100644
--- a/hmac_update.c
+++ b/hmac_update.c
@@ -2,14 +2,6 @@
#include "common.h"
-/**
- * Feed data into the HMAC algorithm
- *
- * @param state The state of the algorithm
- * @param data Data to feed into the algorithm
- * @param n The number of bytes to feed into the
- * algorithm, this must be a multiple of 8
- */
void
libsha1_hmac_update(struct libsha1_hmac_state *restrict state, const void *restrict data, size_t n)
{
diff --git a/init.c b/init.c
index 7d63b1b..4d319f7 100644
--- a/init.c
+++ b/init.c
@@ -10,13 +10,6 @@ static const uint32_t H[] = {
};
-/**
- * Initialise a state
- *
- * @param state The state that should be initialised
- * @param algorithm The hashing algorithm
- * @return Zero on success, -1 on error
- */
int
libsha1_init(struct libsha1_state *restrict state, enum libsha1_algorithm algorithm)
{
diff --git a/process.c b/process.c
index d328bac..fb7df21 100644
--- a/process.c
+++ b/process.c
@@ -9,12 +9,6 @@ rorl(uint32_t n, int k)
}
-/**
- * Process a chunk using SHA-1 or SHA-0
- *
- * @param state The hashing state
- * @param chunk The data to process
- */
void
libsha1_process(struct libsha1_state *restrict state, const unsigned char *restrict chunk)
{
diff --git a/state_output_size.c b/state_output_size.c
index c148a44..06e8719 100644
--- a/state_output_size.c
+++ b/state_output_size.c
@@ -2,10 +2,4 @@
#include "common.h"
-/**
- * Get the output size of the algorithm specified for a state
- *
- * @param state The state
- * @return The number of bytes in the output, zero on error
- */
extern inline size_t libsha1_state_output_size(const struct libsha1_state *restrict state);
diff --git a/sum_fd.c b/sum_fd.c
index a61bf71..73a5a5a 100644
--- a/sum_fd.c
+++ b/sum_fd.c
@@ -2,15 +2,6 @@
#include "common.h"
-/**
- * Calculate the checksum for a file,
- * the content of the file is assumed non-sensitive
- *
- * @param fd The file descriptor of the file
- * @param algorithm The hashing algorithm
- * @param hashsum Output buffer for the hash
- * @return Zero on success, -1 on error
- */
int
libsha1_sum_fd(int fd, enum libsha1_algorithm algorithm, void *restrict hashsum)
{
diff --git a/unhex.c b/unhex.c
index 097b1b8..dbc0f26 100644
--- a/unhex.c
+++ b/unhex.c
@@ -2,14 +2,6 @@
#include "common.h"
-/**
- * Convert a hexadecimal hashsum (both lower case, upper
- * case and mixed is supported) to binary representation
- *
- * @param output Output array, should have an allocation
- * size of at least `strlen(hashsum) / 2`
- * @param hashsum The hashsum to convert
- */
void
libsha1_unhex(void *restrict output_, const char *restrict hashsum)
{
diff --git a/unmarshal.c b/unmarshal.c
index 12eb652..25771b9 100644
--- a/unmarshal.c
+++ b/unmarshal.c
@@ -2,14 +2,6 @@
#include "common.h"
-/**
- * Unmarshal a state from a buffer
- *
- * @param state Output parameter for the unmarshalled state
- * @param buf The buffer from which the state shall be unmarshalled
- * @param bufsize The maximum number of bytes that can be unmarshalled
- * @return The number of read bytes, 0 on failure
- */
size_t
libsha1_unmarshal(struct libsha1_state *restrict state, const void *restrict buf_, size_t bufsize)
{
diff --git a/update.c b/update.c
index 8799061..6ae2928 100644
--- a/update.c
+++ b/update.c
@@ -2,13 +2,6 @@
#include "common.h"
-/**
- * Absorb more of the message
- *
- * @param state The hashing state
- * @param message The message, in bits, must be equivalent to 0 modulus 8
- * @param msglen The length of the message
- */
void
libsha1_update(struct libsha1_state *restrict state, const void *restrict message_, size_t msglen)
{