summaryrefslogtreecommitdiff
path: root/send/users.c
blob: 7b161f9dba3fa9679e40b6b2fe4d0cf5f3e98aaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
}