Welcome to little lamb

Code » limb » commit e67fdf6

Minor adjustments

author Olivier Brunel
2023-02-17 16:17:27 UTC
committer Olivier Brunel
2023-02-20 09:02:35 UTC
parent 5fed3bce3d00b84f9b8556ee083046037cc0a369

Minor adjustments

include/limb/blake3.h +4 -4
include/limb/nextsplit.h +3 -3
include/limb/sha3.h +12 -12

diff --git a/include/limb/blake3.h b/include/limb/blake3.h
index 1520f5a..ce5aef7 100644
--- a/include/limb/blake3.h
+++ b/include/limb/blake3.h
@@ -34,10 +34,10 @@ typedef struct {
   u8 cv_stack[(BLAKE3_MAX_DEPTH + 1) * BLAKE3_OUT_LEN];
 } blake3_ctx;
 
-void blake3_init(blake3_ctx *ctx);
-void blake3_update(blake3_ctx *ctx, const void *msg, size_t len);
-void blake3_final(blake3_ctx *ctx, unsigned char * restrict md);
+extern void blake3_init(blake3_ctx *ctx);
+extern void blake3_update(blake3_ctx *ctx, const void *msg, size_t len);
+extern void blake3_final(blake3_ctx *ctx, unsigned char * restrict md);
 
-void blake3(const void *msg, size_t size, unsigned char * restrict md);
+extern void blake3(const void *msg, size_t size, unsigned char * restrict md);
 
 #endif /* LIMB_BLAKE3_H */
diff --git a/include/limb/nextsplit.h b/include/limb/nextsplit.h
index 93efe2f..cbfc14e 100644
--- a/include/limb/nextsplit.h
+++ b/include/limb/nextsplit.h
@@ -3,8 +3,8 @@
 
 #include <string.h> /* size_t */
 
-size_t nextsplit_ae(size_t min, size_t avg, const void *data, size_t dlen);
-size_t nextsplit_buz(size_t min, size_t avg, const void *data, size_t dlen);
-size_t nextsplit_rabin(size_t min, size_t avg, const void *data, size_t dlen);
+extern size_t nextsplit_ae(size_t min, size_t avg, const void *data, size_t dlen);
+extern size_t nextsplit_buz(size_t min, size_t avg, const void *data, size_t dlen);
+extern size_t nextsplit_rabin(size_t min, size_t avg, const void *data, size_t dlen);
 
 #endif /* LIMB_NEXTSPLIT_H */
diff --git a/include/limb/sha3.h b/include/limb/sha3.h
index dceccf7..532a5c1 100644
--- a/include/limb/sha3.h
+++ b/include/limb/sha3.h
@@ -9,21 +9,21 @@
 
 struct sha3_ctx
 {
-	/* 1600 bits algorithm hashing state */
-	u64 hash[sha3_max_permutation_size];
-	/* 1536-bit buffer for leftovers */
-	u64 message[sha3_max_rate_in_qwords];
-	/* count of bytes in the message[] buffer */
-	unsigned rest;
-	/* size of a message block processed at once */
-	unsigned block_size;
+    /* 1600 bits algorithm hashing state */
+    u64 hash[sha3_max_permutation_size];
+    /* 1536-bit buffer for leftovers */
+    u64 message[sha3_max_rate_in_qwords];
+    /* count of bytes in the message[] buffer */
+    unsigned rest;
+    /* size of a message block processed at once */
+    unsigned block_size;
 };
 typedef struct sha3_ctx sha3_ctx;
 
-void sha3_init(sha3_ctx *ctx, unsigned bits);
-void sha3_update(sha3_ctx *ctx, const void *msg, size_t size);
-void sha3_final(sha3_ctx *ctx, unsigned char * restrict md);
+extern void sha3_init(sha3_ctx *ctx, unsigned bits);
+extern void sha3_update(sha3_ctx *ctx, const void *msg, size_t size);
+extern void sha3_final(sha3_ctx *ctx, unsigned char * restrict md);
 
-void sha3(unsigned bits, const void *msg, size_t size, unsigned char * restrict md);
+extern void sha3(unsigned bits, const void *msg, size_t size, unsigned char * restrict md);
 
 #endif /* LIMB_SHA3_H */