i.e. you couldn't get this working with Qt's QCA so you're thinking of
giving Crypto++ a try?

There are all these straightforward questions that spring to mind:

-Isn't the structure packing a C/C++ feature and basically unrelated
to the crypto library you use?
-How are you trying to pack it?
-What compiler?
-What does your compiler say sizeof(yourStruct) is?
-Are you being screwed over by #pragmas that affect structure packing/
alignment?

But then I wondered... you don't REALLY want to encrypt your struct
header do you? If it specifies the cipher mode, etc.
So if your struct is currently 128 bytes... you would just encrypt the
data (100 bytes)... wouldn't you? Are you supposed to have more data,
to pad it out to 128 bytes?

Tim

On Mar 17, 12:36 pm, Eckos <[EMAIL PROTECTED]> wrote:
> Okay, I'm trying to implement this crypto method this library
> requires. It requires me to create 4 hmac objects then base64 decode a
> key, then create another hmac object based on 3 keys which one is the
> base64 decoded. the other two go through the process of creating off
> of those 4 other hmac. If that makes sense. Then I encrypt the data
> with triple des. then I create a struct like this with these members.
>
> unsigned long uStructHeaderSize; // 28. Does not count data
> unsigned long uCryptMode; // CRYPT_MODE_CBC (1)
> unsigned long uCipherType; // TripleDES (0x6603)
> unsigned long uHashType; // SHA1 (0x8004)
> unsigned long uIVLen;    // 8
> unsigned long uHashLen;  // 20
> unsigned long uCipherLen; // 72
> // Data
> unsigned char aIVBytes[8];
> unsigned char aHashBytes[20];
> unsigned char aCipherBytes[72];
>
> And all its data is in little endian. In order for the encryption to
> process. The struct needs to be 128 bytes no more or less. Then I need
> to encrypt that struct using Bas64 and return it. I've tried using
> QCA(Qt4). And Everything works fine except up to the point of packing.
> And it won't allow me to encrypt the struct as one I think thats how
> it needs to be done. So what im trying to ask does Crypto++ allow me
> to do this?
--~--~---------~--~----~------------~-------~--~----~
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