summaryrefslogtreecommitdiff
path: root/send/users.c
diff options
context:
space:
mode:
Diffstat (limited to 'send/users.c')
-rw-r--r--send/users.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/send/users.c b/send/users.c
new file mode 100644
index 0000000..7b161f9
--- /dev/null
+++ b/send/users.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <openssl/sha.h>
+
+#include "util.h"
+
+char *
+make_userid(char *nick, char *pass) {
+ char *prehash, *hash;
+ int len = asprintf(&prehash, "%s:%s", nick, pass);
+ hash = SHA1(prehash, len, NULL);
+ return hash;
+}