aboutsummaryrefslogtreecommitdiff
path: root/c/main.c
diff options
context:
space:
mode:
authorSamuel Neves <[email protected]>2020-03-31 21:20:54 +0100
committerSamuel Neves <[email protected]>2020-03-31 21:21:08 +0100
commiteec458d03ee7828225dda4f08138563d4ff8bb6d (patch)
tree055e9937743cd889d08cc763d6b8a77bcd78ad5c /c/main.c
parent2dff29cf0e10c2f092579255618a9c34c91eee33 (diff)
move prototypes to shared header file, and make all local functions static.
Diffstat (limited to 'c/main.c')
-rw-r--r--c/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/c/main.c b/c/main.c
index fff3c22..9b8a436 100644
--- a/c/main.c
+++ b/c/main.c
@@ -18,7 +18,7 @@
#define KEYED_HASH_MODE 1
#define DERIVE_KEY_MODE 2
-void hex_char_value(uint8_t c, uint8_t *value, bool *valid) {
+static void hex_char_value(uint8_t c, uint8_t *value, bool *valid) {
if ('0' <= c && c <= '9') {
*value = c - '0';
*valid = true;
@@ -30,7 +30,7 @@ void hex_char_value(uint8_t c, uint8_t *value, bool *valid) {
}
}
-int parse_key(char *hex_key, uint8_t out[BLAKE3_KEY_LEN]) {
+static int parse_key(char *hex_key, uint8_t out[BLAKE3_KEY_LEN]) {
size_t hex_len = strlen(hex_key);
if (hex_len != 64) {
fprintf(stderr, "Expected a 64-char hexadecimal key, got %zu chars.\n",