diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-09 17:16:05 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-09 17:16:05 +0000 |
commit | 90933db7697d9e5ad832a43bd59565339fbbcf55 (patch) | |
tree | f95a2e4a7419f449d668f683cb1624ed8b4ee692 /des.cpp | |
parent | bd1d5e59a0fadcaf2aec024081af1f60ccd7390d (diff) | |
download | cryptopp-90933db7697d9e5ad832a43bd59565339fbbcf55.tar.gz |
VC2005 workaround
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@245 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'des.cpp')
-rw-r--r-- | des.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -424,15 +424,18 @@ void DES_XEX3::Base::UncheckedSetKey(CipherDir dir, const byte *key, unsigned in { AssertValidKeyLength(length); + if (!m_des.get()) + m_des.reset(new DES::Encryption); + memcpy(m_x1, key+(dir==ENCRYPTION?0:2*8), BLOCKSIZE); - m_des.UncheckedSetKey(dir, key+8); + m_des->UncheckedSetKey(dir, key+8); memcpy(m_x3, key+(dir==DECRYPTION?0:2*8), BLOCKSIZE); } void DES_XEX3::Base::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const { xorbuf(outBlock, inBlock, m_x1, BLOCKSIZE); - m_des.ProcessAndXorBlock(outBlock, xorBlock, outBlock); + m_des->ProcessAndXorBlock(outBlock, xorBlock, outBlock); xorbuf(outBlock, m_x3, BLOCKSIZE); } |