Hello Everyone,

Could someone do me a favor to help it out?

With my 64bit Window7 machine, 
I can build Crypto++ static library in X86 in visual studio 2017, and use 
it without any issue,

so I built  Crypto++ static library in X64 within visual studio 2017, and 
tried to use it with 64bit application,
It always crashed on the line m_k[i] = a+b with error message :
System.AccessViolationException: 'Attempted to read or write protected 
memory. This is often an indication that other memory is corrupt.'

Below is the section of codes when crashed,  the Crypto++ is the latest 
source.2016.

void Twofish::Base::UncheckedSetKey(const byte *userKey, unsigned int 
keylength, const NameValuePairs &)
{
AssertValidKeyLength(keylength);

unsigned int len = (keylength <= 16 ? 2 : (keylength <= 24 ? 3 : 4));
SecBlock<word32> key(len*2);
GetUserKey(LITTLE_ENDIAN_ORDER, key.begin(), len*2, userKey, keylength);

unsigned int i;
for (i=0; i<40; i+=2)
{
word32 a = h(i, key, len);
word32 b = rotlFixed(h(i+1, key+1, len), 8);
m_k[i] = a+b;
m_k[i+1] = rotlFixed(a+2*b, 9);
}
.............................................................

Did I miss any setting? 

Thanks so much for any help.

Kevin

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to