[raknet] Implement TEABlockEncryptor ctor

This commit is contained in:
RD42
2023-12-01 20:53:12 +08:00
parent decfd66b77
commit 8ee3591083
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,16 @@
// TODO: Implement TEABlockEncryptor.cpp
#include "TEABlockEncryptor.h"
#define TEA_ROUNDS 32
#define TEA_XOR_MASK 0x5E94A3CF
unsigned int TEABlockEncryptor::initObsDelta = (0x9E3779B9 ^ TEA_XOR_MASK);
TEABlockEncryptor::TEABlockEncryptor()
{
initDelta = initObsDelta ^ TEA_XOR_MASK;
initSum = initDelta * TEA_ROUNDS;
keySet = false;
}