summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol132.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-23 23:35:23 +0100
committermadmaxoft <github@xoft.cz>2014-01-23 23:35:23 +0100
commit5f34c78091a7c884a9c27c0f0691cd1f03174dfe (patch)
tree0162e472332c09c3841bd46656ae8b2ec7f87b0e /src/Protocol/Protocol132.h
parentFixed a bug in LeakFinder. (diff)
downloadcuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.tar
cuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.tar.gz
cuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.tar.bz2
cuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.tar.lz
cuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.tar.xz
cuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.tar.zst
cuberite-5f34c78091a7c884a9c27c0f0691cd1f03174dfe.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol132.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/Protocol/Protocol132.h b/src/Protocol/Protocol132.h
index 80fc8740a..89f4636f5 100644
--- a/src/Protocol/Protocol132.h
+++ b/src/Protocol/Protocol132.h
@@ -20,13 +20,12 @@
#pragma warning(disable:4702)
#endif
-#include "cryptopp/modes.h"
-#include "cryptopp/aes.h"
-
#ifdef _MSC_VER
#pragma warning(pop)
#endif
+#include "../Crypto.h"
+
@@ -79,16 +78,15 @@ public:
protected:
bool m_IsEncrypted;
- CryptoPP::CFB_Mode<CryptoPP::AES>::Decryption m_Decryptor;
- CryptoPP::CFB_Mode<CryptoPP::AES>::Encryption m_Encryptor;
+
+ cAESCFBDecryptor m_Decryptor;
+ cAESCFBEncryptor m_Encryptor;
+
AString m_DataToSend;
/// The ServerID used for session authentication; set in StartEncryption(), used in GetAuthServerID()
AString m_AuthServerID;
- /// The server's public key, as used by SendEncryptionKeyRequest() and StartEncryption()
- AString m_ServerPublicKey;
-
virtual void SendData(const char * a_Data, int a_Size) override;
// DEBUG:
@@ -108,7 +106,7 @@ protected:
void HandleEncryptionKeyResponse(const AString & a_EncKey, const AString & a_EncNonce);
/// Starts the symmetric encryption with the specified key; also sets m_AuthServerID
- void StartEncryption(const byte * a_Key);
+ void StartEncryption(const Byte * a_Key);
} ;