Skip to content

Commit 6392c6f

Browse files
committed
Fix macOS compilation errors
1 parent ab2e580 commit 6392c6f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

source/common/cryptography.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include <cryptopp/oids.h>
44

5+
#include <unordered_map>
6+
57
namespace cryptography
68
{
79
AES::AES( ) :

source/module/crypt.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ LUA_FUNCTION_STATIC( SetPrimaryKey )
171171
cryptography::Crypter *crypter = Get( LUA, 1 );
172172
LUA->CheckType( 2, GarrysMod::Lua::Type::STRING );
173173

174-
size_t priLen = 0;
174+
uint32_t priLen = 0;
175175
const uint8_t *priKey = reinterpret_cast<const uint8_t *>( LUA->GetString( 2, &priLen ) );
176176

177177
cryptography::bytes privKey( priKey, priKey + priLen );
@@ -205,7 +205,7 @@ LUA_FUNCTION_STATIC( GenerateSecondaryKey )
205205
cryptography::bytes secKey;
206206
if( LUA->IsType( 2, GarrysMod::Lua::Type::STRING ) )
207207
{
208-
size_t priLen = 0;
208+
uint32_t priLen = 0;
209209
const uint8_t *priKey = reinterpret_cast<const uint8_t *>( LUA->GetString( 2, &priLen ) );
210210
cryptography::bytes privKey( priKey, priKey + priLen );
211211
secKey = crypter->GenerateSecondaryKey( privKey );
@@ -229,7 +229,7 @@ LUA_FUNCTION_STATIC( SetSecondaryKey )
229229
cryptography::Crypter *crypter = Get( LUA, 1 );
230230
LUA->CheckType( 2, GarrysMod::Lua::Type::STRING );
231231

232-
size_t secLen = 0;
232+
uint32_t secLen = 0;
233233
const uint8_t *secKey = reinterpret_cast<const uint8_t *>( LUA->GetString( 2, &secLen ) );
234234

235235
cryptography::bytes secoKey( secKey, secKey + secLen );
@@ -249,7 +249,7 @@ LUA_FUNCTION_STATIC( Decrypt )
249249
cryptography::Crypter *crypter = Get( LUA, 1 );
250250
LUA->CheckType( 2, GarrysMod::Lua::Type::STRING );
251251

252-
size_t len = 0;
252+
uint32_t len = 0;
253253
const uint8_t *data = reinterpret_cast<const uint8_t *>( LUA->GetString( 2, &len ) );
254254

255255
cryptography::bytes encrypted( data, data + len );
@@ -270,7 +270,7 @@ LUA_FUNCTION_STATIC( Encrypt )
270270
cryptography::Crypter *crypter = Get( LUA, 1 );
271271
LUA->CheckType( 2, GarrysMod::Lua::Type::STRING );
272272

273-
size_t len = 0;
273+
uint32_t len = 0;
274274
const uint8_t *data = reinterpret_cast<const uint8_t *>( LUA->GetString( 2, &len ) );
275275

276276
cryptography::bytes decrypted( data, data + len );

0 commit comments

Comments
 (0)