Hi,

I am trying to move crypto[bouncycastle] code from Java to C++ and wondering how can I use key derivation functions in a similar way:

Basicly in Java I did:
 
----- o -----
TigerDigest digest = new ....
KDF2BytesGenerator kdf2 = new KDF2BytesGenerator(digest);
byte[] iv = {.....
KDFParameters params = new KDFParameters(iv, myKey);

kdf2.init(params);
kdf2.generateBytes( .......
----- o -----

Now in C++ I stopped here:

----- o -----
P1363_KDF2<Tiger> kdf2;

const byte derivedkey[16];

kdf2.DeriveKey(derivedkey, sizeof(derivedkey), key_128bits, sizeof(key_128bits), ...., ....)
----- o -----

What is the correct way to pass derivation key params in CryptoPP? (last param)



Thank You,
Diego Taylor

Reply via email to