Hi Magnus
 
try that code
 
int saltLength = ?;
int keyLength = ?;
int iterations= ?;
 
byte* key = new byte[keyLength];;
byte salt[] = {0x??, 0x??, 0x??};
 
m_PBEContext = new PKCS5_PBKDF2_HMAC<SHA1>;
m_PBEContext->DeriveKey(key, keyLength, 1, (byte *)password.data(), password.size(), salt, saltLength, iterations, 0);
//the result will be in the key
 
Regards
Haytham Mohammed

Magnus Therning <[EMAIL PROTECTED]> wrote:
I'm _very_ new to crypto++ so the class hierarchy is somewhat
overwhelming me. I'm sure it'll get better over time but at the moment
I'd love some useful pointers :-)

My first problem is key generation from a password. PKCS5 is there, I
can see it, but I can't really make out how to use it. Are there any
examples out in the wild on how to hook it all together?

/M

--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
[EMAIL PROTECTED] Jabber: [EMAIL PROTECTED]
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

If our ideas of intellectual property are wrong, we must change them,
improve them and return them to their original purpose. When
intellectual property rules diminish the supply of new ideas, they
steal from all of us.
-- Andrew Brown, November 19, 2005, The Guardian


Get your email and more, right on the new Yahoo.com

Reply via email to