summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-09-19 22:58:27 +0200
committerdefault <nobody@localhost>2022-09-19 22:58:27 +0200
commit8be433c9b65fe5f214151651055700d1fea02a56 (patch)
treef10a87901d7b2fdaab66951501b0d8dfada33e00 /main.c
parentc88d4f1e152859254d28bcd6cd7ad7798f0782c4 (diff)
New function hash_password() and check_password().
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index ab4093b..ab83086 100644
--- a/main.c
+++ b/main.c
@@ -16,5 +16,8 @@ int main(int argc, char *argv[])
snac_open(&snac, "mike");
snac_log(&snac, xs_str_new("ok"));
+ char *passwd = xs_dict_get(snac.config, "passwd");
+ printf("%d\n", check_password("mike", "1234", passwd));
+
return 0;
}