mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 06:38:11 +00:00
UnRAR: Eliminate static var to make code thread-safe
This commit is contained in:
parent
c9c03dd191
commit
777c5339a0
9
deps/unrar/rijndael.cpp
vendored
9
deps/unrar/rijndael.cpp
vendored
@ -11,10 +11,11 @@
|
||||
#include <wmmintrin.h>
|
||||
#endif
|
||||
|
||||
static byte S[256],S5[256],rcon[30];
|
||||
static byte T1[256][4],T2[256][4],T3[256][4],T4[256][4];
|
||||
static byte T5[256][4],T6[256][4],T7[256][4],T8[256][4];
|
||||
static byte U1[256][4],U2[256][4],U3[256][4],U4[256][4];
|
||||
// not thread-safe ?
|
||||
//static byte S[256],S5[256],rcon[30];
|
||||
//static byte T1[256][4],T2[256][4],T3[256][4],T4[256][4];
|
||||
//static byte T5[256][4],T6[256][4],T7[256][4],T8[256][4];
|
||||
//static byte U1[256][4],U2[256][4],U3[256][4],U4[256][4];
|
||||
|
||||
|
||||
inline void Xor128(void *dest,const void *arg1,const void *arg2)
|
||||
|
5
deps/unrar/rijndael.hpp
vendored
5
deps/unrar/rijndael.hpp
vendored
@ -33,6 +33,11 @@ class Rijndael
|
||||
int m_uRounds;
|
||||
byte m_initVector[MAX_IV_SIZE];
|
||||
byte m_expandedKey[_MAX_ROUNDS+1][4][4];
|
||||
|
||||
byte S[256],S5[256],rcon[30];
|
||||
byte T1[256][4],T2[256][4],T3[256][4],T4[256][4];
|
||||
byte T5[256][4],T6[256][4],T7[256][4],T8[256][4];
|
||||
byte U1[256][4],U2[256][4],U3[256][4],U4[256][4];
|
||||
public:
|
||||
Rijndael();
|
||||
void Init(bool Encrypt,const byte *key,uint keyLen,const byte *initVector);
|
||||
|
Loading…
Reference in New Issue
Block a user