mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Make this compatible to build with MSVS 2022
This commit is contained in:
parent
590131590c
commit
9dd15ef922
9 changed files with 201 additions and 49 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <openssl/sha.h>
|
||||
#include <openssl/md5.h>
|
||||
#include <openssl/hmac.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
namespace wowee {
|
||||
namespace auth {
|
||||
|
|
@ -19,7 +20,8 @@ std::vector<uint8_t> Crypto::sha1(const std::string& data) {
|
|||
|
||||
std::vector<uint8_t> Crypto::md5(const std::vector<uint8_t>& data) {
|
||||
std::vector<uint8_t> hash(MD5_DIGEST_LENGTH);
|
||||
MD5(data.data(), data.size(), hash.data());
|
||||
unsigned int length = 0;
|
||||
EVP_Digest(data.data(), data.size(), hash.data(), &length, EVP_md5(), nullptr);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue