Hi Rash,

> > StringSource( digestPasswdIV.data(), true, new HashFilter(*(new MD5),
and
> byte salt[8] = "8 bit random salt";
Please forgive my ignorance. Have you programmed in C++ before? I ask
because when I send responses I presume you have.

Jeff

On 9/4/07, Rash <[EMAIL PROTECTED]> wrote:
>
> Something like the following:
>
> int key_len = 16;
> int iv_len = 16;
> int desired_len = key_len+iv_len;
>
> string data;
> string d;
>
> string pass = "user password";
> byte salt[8] = "8 bit random salt";
>
> while ( data.length() < desired_len)
> {
>    string digestKeyAndIV = d + pass + string( (char*)salt ;
>    data += md5(digestKeyAndIV);    //psuedo code only
> }
>
> string key = data .substr(0, key_len);
> string iv = data.substr($key_len, $iv_len);
>
> The above code is just a pseudo code. I want to implement the same
> scenario in Crypto++.
> Thanks in advance.
>
> On Sep 4, 2:57 pm, Rash <[EMAIL PROTECTED]> wrote:
> > Hello all,
> >
> > I have allocated space of 32 bytes in pass but when the StringSource
> > is
> > executed I can see only 19 bytes of data. I want to have exactly 32
> > bytes
> > of data in pass. How can I do it?
> >
> > byte pass[2*AES::BLOCKSIZE];
> > StringSource( digestPasswdIV.data(), true, new HashFilter(*(new MD5),
> > new
> >                 ArraySink(pass, 2*AES::BLOCKSIZE)) );
> >
[ SNIP ]

--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to