summaryrefslogtreecommitdiff
path: root/gcm.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2010-06-18 00:51:12 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2010-06-18 00:51:12 +0000
commit5ed048bd178f6a9789c90e65f406e308b3bb35cc (patch)
treee30885d79424f86b8099213fe53efebc19a55e3d /gcm.h
parent277e95a2d6ffbc636cb2df66d53b7f50e94bfd24 (diff)
downloadcryptopp-5ed048bd178f6a9789c90e65f406e308b3bb35cc.tar.gz
add "volatile" to prevent compiler optimizing away code
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@482 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'gcm.h')
-rw-r--r--gcm.h4
1 files changed, 2 insertions, 2 deletions
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};
};