summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-08 17:19:34 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-08 17:22:16 -0400
commitca2637e4ddd64a85d7e0300b27b3765906265d7f (patch)
treeb23339c31712bd5180434db3cfb45dfa0f3a2d46 /util.c
parente6f6b0f854e531ce2a96de8b7fa827cbd924da5e (diff)
downloadrandom-seed-ca2637e4ddd64a85d7e0300b27b3765906265d7f.tar.xz
random-seed-ca2637e4ddd64a85d7e0300b27b3765906265d7f.zip
Fix stuff.
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util.c b/util.c
index 7dd299a..f0d1fda 100644
--- a/util.c
+++ b/util.c
@@ -63,7 +63,7 @@ void hash(const unsigned char salt[static SALT_LEN], unsigned char *out, const v
#endif
sha256_ctx ctx;
sha256_init(&ctx);
- //sha256_update(&ctx, salt, SALT_LEN);
+ sha256_update(&ctx, salt, SALT_LEN);
sha256_update(&ctx, in, (unsigned int)size);
sha256_final(&ctx, out);
}
@@ -73,6 +73,8 @@ void print_hash(const unsigned char digest[static HASH_LEN]) {
char hash[HASH_LEN*2+1];
mem2hex(hash, digest, HASH_LEN);
fprintf(stderr, "hash: %s\n", hash);
+#else
+ (void)digest;
#endif
}