moved temp hard coded key out of crypto class.

This commit is contained in:
Nick Bolton 2013-04-08 13:04:20 +00:00
parent b2746bc1b2
commit 323285a931
3 changed files with 14 additions and 8 deletions

View file

@ -35,6 +35,10 @@
#include "CArch.h"
#include "IPlatformScreen.h"
#include "CCryptoStream.h"
// TODO: these are just for testing -- make sure they're gone by release!
const byte g_key[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
const byte g_iv[] = "aaaaaaaaaaaaaaa";
//
// CClient
@ -149,7 +153,9 @@ CClient::connect()
m_stream = new CPacketStreamFilter(m_stream, true);
if (s_cryptoEnabled) {
m_stream = new CCryptoStream(*EVENTQUEUE, m_stream, true);
CCryptoStream* cryptoStream = new CCryptoStream(*EVENTQUEUE, m_stream, true);
cryptoStream->setKeyWithIV(g_key, sizeof(g_key), g_iv);
m_stream = cryptoStream;
}
// connect