summaryrefslogtreecommitdiff
path: root/src/map/log.c
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-02-05 23:54:49 -0300
committerJesusaves <cpntb1@ymail.com>2022-02-05 23:54:49 -0300
commitca7b441512d5b2a67ecfa3f602a16729b7c100d9 (patch)
tree7a9dc332334a1153038d88b79d83aa2e2091b048 /src/map/log.c
parent5a4bd61515039879debc668c1934341b4bb7cbf6 (diff)
downloadhercules-ca7b441512d5b2a67ecfa3f602a16729b7c100d9.tar.gz
hercules-ca7b441512d5b2a67ecfa3f602a16729b7c100d9.tar.bz2
hercules-ca7b441512d5b2a67ecfa3f602a16729b7c100d9.tar.xz
hercules-ca7b441512d5b2a67ecfa3f602a16729b7c100d9.zip
OpenSSL is now required to build. Implement a SHA256 interface. Log chat as SHA256.
Diffstat (limited to 'src/map/log.c')
-rw-r--r--src/map/log.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/log.c b/src/map/log.c
index 85cdac84a..5676730dc 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -486,10 +486,13 @@ static void log_chat(e_log_chat_type type, int type_id, int src_charid, int src_
if (dst_charname == NULL)
dst_charname = "";
- // Hash the message, we don't care with it
+ // Hash the message, we don't care with it (FIXME)
+ //unsigned char obuf[SHA256_DIGEST_LENGTH];
+ //SHA256((const unsigned char*)(message), strlen(message), obuf);
char *md5str;
- md5str = (char *)aMalloc((32+1)*sizeof(char));
- md5->string(message, md5str);
+ md5str = (char *)aMalloc((64+1)*sizeof(char));
+ md5->sha256(message, md5str);
+ //md5str = (char *)obuf;
logs->chat_sub(type,type_id,src_charid,src_accid,mapname,x,y,dst_charname,md5str);
}