summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base32.cpp2
-rw-r--r--base64.cpp2
-rw-r--r--gcm.cpp2
-rw-r--r--gcm.h4
-rw-r--r--gost.cpp2
-rw-r--r--gost.h2
-rw-r--r--hex.cpp2
-rw-r--r--idea.cpp2
-rw-r--r--idea.h2
9 files changed, 10 insertions, 10 deletions
diff --git a/base32.cpp b/base32.cpp
index 56bce6e..0568f07 100644
--- a/base32.cpp
+++ b/base32.cpp
@@ -25,7 +25,7 @@ void Base32Decoder::IsolatedInitialize(const NameValuePairs &parameters)
const int *Base32Decoder::GetDefaultDecodingLookupArray()
{
- static bool s_initialized = false;
+ static volatile bool s_initialized = false;
static int s_array[256];
if (!s_initialized)
diff --git a/base64.cpp b/base64.cpp
index f86dc6e..7571f2b 100644
--- a/base64.cpp
+++ b/base64.cpp
@@ -28,7 +28,7 @@ void Base64Encoder::IsolatedInitialize(const NameValuePairs &parameters)
const int *Base64Decoder::GetDecodingLookupArray()
{
- static bool s_initialized = false;
+ static volatile bool s_initialized = false;
static int s_array[256];
if (!s_initialized)
diff --git a/gcm.cpp b/gcm.cpp
index 986aa2a..8367227 100644
--- a/gcm.cpp
+++ b/gcm.cpp
@@ -17,7 +17,7 @@
NAMESPACE_BEGIN(CryptoPP)
word16 GCM_Base::s_reductionTable[256];
-bool GCM_Base::s_reductionTableInitialized = false;
+volatile bool GCM_Base::s_reductionTableInitialized = false;
void GCM_Base::GCTR::IncrementCounterBy256()
{
diff --git a/gcm.h b/gcm.h
index 851ae80..0133ffe 100644
--- a/gcm.h
+++ b/gcm.h
@@ -64,7 +64,7 @@ protected:
byte *HashKey() {return m_buffer+2*REQUIRED_BLOCKSIZE;}
byte *MulTable() {return m_buffer+3*REQUIRED_BLOCKSIZE;}
- class GCTR : public CTR_Mode_ExternalCipher::Encryption
+ class CRYPTOPP_DLL GCTR : public CTR_Mode_ExternalCipher::Encryption
{
protected:
void IncrementCounterBy256();
@@ -72,7 +72,7 @@ protected:
GCTR m_ctr;
static word16 s_reductionTable[256];
- static bool s_reductionTableInitialized;
+ static volatile bool s_reductionTableInitialized;
enum {REQUIRED_BLOCKSIZE = 16, HASH_BLOCKSIZE = 16};
};
diff --git a/gost.cpp b/gost.cpp
index 1775238..bbd8297 100644
--- a/gost.cpp
+++ b/gost.cpp
@@ -27,7 +27,7 @@ const byte GOST::Base::sBox[8][16]={
{14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7 }};
*/
-bool GOST::Base::sTableCalculated = false;
+volatile bool GOST::Base::sTableCalculated = false;
word32 GOST::Base::sTable[4][256];
void GOST::Base::UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &)
diff --git a/gost.h b/gost.h
index 044c18d..e6fe469 100644
--- a/gost.h
+++ b/gost.h
@@ -27,7 +27,7 @@ class GOST : public GOST_Info, public BlockCipherDocumentation
static void PrecalculateSTable();
static const byte sBox[8][16];
- static bool sTableCalculated;
+ static volatile bool sTableCalculated;
static word32 sTable[4][256];
FixedSizeSecBlock<word32, 8> key;
diff --git a/hex.cpp b/hex.cpp
index b6484a5..5731df5 100644
--- a/hex.cpp
+++ b/hex.cpp
@@ -28,7 +28,7 @@ void HexDecoder::IsolatedInitialize(const NameValuePairs &parameters)
const int *HexDecoder::GetDefaultDecodingLookupArray()
{
- static bool s_initialized = false;
+ static volatile bool s_initialized = false;
static int s_array[256];
if (!s_initialized)
diff --git a/idea.cpp b/idea.cpp
index b0768fa..bbbdbac 100644
--- a/idea.cpp
+++ b/idea.cpp
@@ -30,7 +30,7 @@ CRYPTOPP_COMPILE_ASSERT(sizeof(IDEA::Word) >= 2);
}
#ifdef IDEA_LARGECACHE
-bool IDEA::Base::tablesBuilt = false;
+volatile bool IDEA::Base::tablesBuilt = false;
word16 IDEA::Base::log[0x10000];
word16 IDEA::Base::antilog[0x10000];
diff --git a/idea.h b/idea.h
index ce026a1..2ab5713 100644
--- a/idea.h
+++ b/idea.h
@@ -43,7 +43,7 @@ private:
static inline void LookupMUL(word &a, word b);
void LookupKeyLogs();
static void BuildLogTables();
- static bool tablesBuilt;
+ static volatile bool tablesBuilt;
static word16 log[0x10000], antilog[0x10000];
#endif
};