@@ -171,7 +171,7 @@ LUA_FUNCTION_STATIC( SetPrimaryKey )
171
171
cryptography::Crypter *crypter = Get ( LUA, 1 );
172
172
LUA->CheckType ( 2 , GarrysMod::Lua::Type::STRING );
173
173
174
- size_t priLen = 0 ;
174
+ uint32_t priLen = 0 ;
175
175
const uint8_t *priKey = reinterpret_cast <const uint8_t *>( LUA->GetString ( 2 , &priLen ) );
176
176
177
177
cryptography::bytes privKey ( priKey, priKey + priLen );
@@ -205,7 +205,7 @@ LUA_FUNCTION_STATIC( GenerateSecondaryKey )
205
205
cryptography::bytes secKey;
206
206
if ( LUA->IsType ( 2 , GarrysMod::Lua::Type::STRING ) )
207
207
{
208
- size_t priLen = 0 ;
208
+ uint32_t priLen = 0 ;
209
209
const uint8_t *priKey = reinterpret_cast <const uint8_t *>( LUA->GetString ( 2 , &priLen ) );
210
210
cryptography::bytes privKey ( priKey, priKey + priLen );
211
211
secKey = crypter->GenerateSecondaryKey ( privKey );
@@ -229,7 +229,7 @@ LUA_FUNCTION_STATIC( SetSecondaryKey )
229
229
cryptography::Crypter *crypter = Get ( LUA, 1 );
230
230
LUA->CheckType ( 2 , GarrysMod::Lua::Type::STRING );
231
231
232
- size_t secLen = 0 ;
232
+ uint32_t secLen = 0 ;
233
233
const uint8_t *secKey = reinterpret_cast <const uint8_t *>( LUA->GetString ( 2 , &secLen ) );
234
234
235
235
cryptography::bytes secoKey ( secKey, secKey + secLen );
@@ -249,7 +249,7 @@ LUA_FUNCTION_STATIC( Decrypt )
249
249
cryptography::Crypter *crypter = Get ( LUA, 1 );
250
250
LUA->CheckType ( 2 , GarrysMod::Lua::Type::STRING );
251
251
252
- size_t len = 0 ;
252
+ uint32_t len = 0 ;
253
253
const uint8_t *data = reinterpret_cast <const uint8_t *>( LUA->GetString ( 2 , &len ) );
254
254
255
255
cryptography::bytes encrypted ( data, data + len );
@@ -270,7 +270,7 @@ LUA_FUNCTION_STATIC( Encrypt )
270
270
cryptography::Crypter *crypter = Get ( LUA, 1 );
271
271
LUA->CheckType ( 2 , GarrysMod::Lua::Type::STRING );
272
272
273
- size_t len = 0 ;
273
+ uint32_t len = 0 ;
274
274
const uint8_t *data = reinterpret_cast <const uint8_t *>( LUA->GetString ( 2 , &len ) );
275
275
276
276
cryptography::bytes decrypted ( data, data + len );
0 commit comments