feat(net): handle encryption on message sends

This commit is contained in:
fallenoak 2023-03-24 16:54:38 -05:00
parent 391e299865
commit ea79f5de1d
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

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;