This commit is contained in:
Andrew Pamment 2018-05-26 12:46:49 +10:00
parent 834afccb57
commit cf5fdf93da

View File

@ -5,7 +5,7 @@
#include <ctype.h> #include <ctype.h>
#include <openssl/evp.h> #include <openssl/evp.h>
cchar *hash_sha256(char *pass, char *salt) { char *hash_sha256(char *pass, char *salt) {
char *buffer = (char *)malloc(strlen(pass) + strlen(salt) + 1); char *buffer = (char *)malloc(strlen(pass) + strlen(salt) + 1);
char *shash = NULL; char *shash = NULL;
unsigned char hash[EVP_MAX_MD_SIZE]; unsigned char hash[EVP_MAX_MD_SIZE];