Add setXteaKey function

This commit is contained in:
Henrique
2012-08-01 21:24:54 -03:00
parent cadf07974a
commit 3b345cf868
3 changed files with 10 additions and 0 deletions

View File

@@ -151,6 +151,14 @@ void Protocol::generateXteaKey()
m_xteaKey[3] = unif(eng);
}
void Protocol::setXteaKey(uint32 a, uint32 b, uint32 c, uint32 d)
{
m_xteaKey[0] = a;
m_xteaKey[1] = b;
m_xteaKey[2] = c;
m_xteaKey[3] = d;
}
std::vector<int> Protocol::getXteaKey()
{
std::vector<int> xteaKey;

View File

@@ -46,6 +46,7 @@ public:
void setConnection(const ConnectionPtr& connection) { m_connection = connection; }
void generateXteaKey();
void setXteaKey(uint32 a, uint32 b, uint32 c, uint32 d);
std::vector<int> getXteaKey();
void enableXteaEncryption() { m_xteaEncryptionEnabled = true; }