#include <openssl/sha.h>
#include <stdio.h>
#include <string.h>
void hashPassword(const char password, const char salt, unsigned char hash) {
char saltedPassword[256];
snprintf(saltedPassword, sizeof(saltedPassword), “%s%s”, password, salt);
SHA256((unsigned char)saltedPassword, strlen(saltedPassword), hash);
}
利唐i人事HR社区,发布者:HR数字化研究员,转转请注明出处:https://www.ihr360.com/hrnews/20241236484.html