summaryrefslogtreecommitdiff
path: root/csgo-loader/csgo-client/Security/Encryption.hpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2019-01-01 20:31:51 +1300
committerboris <wzn@moneybot.cc>2019-01-01 20:31:51 +1300
commit7a3b48831bfc9c4aa8c39c1e42d5bf5dd73e43c5 (patch)
tree954898c772081536a5ff4dc36a42591608b797c0 /csgo-loader/csgo-client/Security/Encryption.hpp
parentb9702fe8541e61f27f5c788dc72feaefe5abfc0d (diff)
whole buncha fixes & switching to vmp
Diffstat (limited to 'csgo-loader/csgo-client/Security/Encryption.hpp')
-rw-r--r--csgo-loader/csgo-client/Security/Encryption.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/csgo-loader/csgo-client/Security/Encryption.hpp b/csgo-loader/csgo-client/Security/Encryption.hpp
index b1c49dc..bf1346e 100644
--- a/csgo-loader/csgo-client/Security/Encryption.hpp
+++ b/csgo-loader/csgo-client/Security/Encryption.hpp
@@ -5,6 +5,8 @@
#include <windows.h>
#include <wincrypt.h>
+#include <UserExperience/UserInterface.hpp>
+
using ByteArray = std::vector<uint8_t>;
#define BLOCK_SIZE 16
@@ -71,7 +73,7 @@ namespace Wrapper
// Encryption wrapper.
class Encryption
{
- ByteArray m_EncryptionKey;
+ uint8_t m_EncryptionKey[32];
HCRYPTPROV m_CryptProvider;
public:
@@ -87,7 +89,15 @@ namespace Wrapper
// Exposes the encryption key.
ByteArray GetKey()
{
- return m_EncryptionKey;
+ ByteArray TemporaryKey;
+
+ TemporaryKey.insert(
+ TemporaryKey.begin(),
+ m_EncryptionKey,
+ m_EncryptionKey + sizeof m_EncryptionKey
+ );
+
+ return TemporaryKey;
}
};
} \ No newline at end of file