feat(net): handle encryption on message sends

This commit is contained in:
fallenoak committed 2023-03-24 16:54:38 -05:00
1 parent 391e299865
commit ea79f5de1d
1 file changed
+4 -2
+4 -2
View File
@@ -738,7 +738,8 @@ WC_SEND_RESULT WowConnection::Send(CDataStore* msg, int32_t a3) {
auto sn = this->NewSendNode(data, msg->Size(), false);
if (this->m_encrypt) {
// TODO encryption
auto bufSize = std::min(sn->size, sn->size + this->uint375 - sn->datasize);
SARC4ProcessBuffer(sn->data, bufSize, &this->m_sendKey, &this->m_sendKey);
}
this->m_sendList.LinkToTail(sn);
@@ -782,7 +783,8 @@ WC_SEND_RESULT WowConnection::Send(CDataStore* msg, int32_t a3) {
}
if (this->m_encrypt) {
// TODO encryption
auto bufSize = std::min(sn->size, sn->size + this->uint375 - sn->datasize);
SARC4ProcessBuffer(sn->data, bufSize, &this->m_sendKey, &this->m_sendKey);
}
uint32_t written;