The highlighted line causes a segmentation fault:
void DeriveKey(byte * key, wxString & password, byte * iv)
{
/** Deriving a key from password **/
//Convert password to UTF-32
wxCharBuffer cbuff = password.mb_str(wxMBConvUTF32());
//Assign UTF-32 data to a byte buffer
byte * bpass = new byte[cbuff.length()];
memcpy(bpass, (byte*)cbuff.data(), cbuff.length());
//Derive the key
PKCS5_PBKDF2_HMAC<CRC32> KeyDeriver;
*KeyDeriver.DeriveKey(key, 16, (byte)0, bpass, cbuff.length(), iv, 16,
1);*
}
What's wrong? Also, how do I use the "purpose" parameter (it is currently
(byte)0 )?
--
--
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.