|
 |
|
|
If i add only header file, it compiles well. But if i add 'Gzip zipper(1);' code, compiler puts error message why does this happen? I'm using Crypto++ 5.2.1 library..
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
'CryptoPP::Gzip::Gzip(CryptoPP::BufferedTransformation *,unsigned int,unsigned int,bool)' : cannot convert argument 1 'int' to 'CryptoPP::BufferedTransformation *'
So it says Gzip zipper(1) is wrong.. how should i change it?? thx for your help.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Which breaks Get() code for some unknown reason (to me at this point).
The work around seems to be to use Gunzip as Wei demonstrates in test.cpp:
void GunzipFile(const char *in, const char *out) { FileSource(in, true, new Gunzip(new FileSink(out))); }
However, this means at times a double buffer space is required - one for the string, and the one for a BYTE[] if used.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I assume Close from the Crypto++ library is not longer available?
Well libraries/frameworks change I suppose.
I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerrywww.many-monkeys.com
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
Jeffrey Walton wrote: It's nice to see you monitor your articles
I do try, but one is getting old and forgetful.
I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerrywww.many-monkeys.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
I forgot I even posted a solution - even though if I actually looked at the rest of the messages it would have been apparent. Must check my glasses as well.
I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerrywww.many-monkeys.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
In my thread, I have a Gzip instance. So, each time after I capture the desktop image, I use folowing code to compress the buffer just like the example: while(1) { ... //some code used to capture the desktop image zipper.Put((BYTE*)Buffer, Buflen) zipper.Close();
size = zipper.MaxRetrieveable(); //some other manipulate ... } BUT, when run the codes second time, I got a ZERO size ,that's to say ,the varible szie equal 0!!!
Who can help me ???
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
withou a full sample that exhibits the problem its hard to work out the problem.
You might want to create a new zipper object in each loop so that it starts afresh each time.
I don't use the crypto++ library at the mo as I am in a pure .NET environment.
I am using VB on the current project www.many-monkeys.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes, after I moved the codes in while loop to a function, it worked! But, there has a new problem. If I just only use the UNZIP instance to unzip a data buffer zipped by ZIP in another program, each time when I run unzipper.Close(); I got an exception said: Unhandle exception in **.zip(KERNAL32.DLL):0xE06D7363: Mirosoft C++ Exception. Why? Must I use ZIP and UNZIP together? Or I can't use UNZIP separetly? Thank you for your kind to answer my questions!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
you should be able to - this is one for the crypto++ people.
You could try stepping into the code and seeing where in the crypto++ code it fails exactly.
I am using VB on the current project www.many-monkeys.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi, I have read many places and found that Crypto++ functions are very much compatible to php mcrypt library. I never knew how to use this in VC++ application. You have dobe such a wonderful work and its so easy to understand that i can compile and run your code easily. But i am having a small problem and hope that you can solve it out. I have to use the mcrypt library of php to encrypt a file at server and i have to decrypt the same file on client side using VC++. I am using Rijndael algorithm for encryption at server side through PHP. as the documentation says... mcrypt's MCRYPT_RIJNDAEL_128 is compatible with cryptopp-php's CRYPTOPP_CIPHER_AES/ CRYPTOPP_CIPHER_RIJNDAEL, which are just aliases for each other. and
MCRYPT_MODE_CBC in mcrypt and CRYPTOPP_MODE_CBC in cryptopp-php.
MCRYPT_MODE_ECB in mcrypt and CRYPTOPP_MODE_ECB in cryptopp-php.
Can you tell me how to use crypto++ to do the same. or show me some piece of code to make it easy to understand..I need it urgently..Please help in doing the same. Any help or pointers are highly appreciated. Thanks a lot in advance..
  Regards,
Himanshu
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Your best bet is to post this to the crypto++ mailing list however as I remember there few samples in the library but the test harness they produce should give you pointers.
I currently don't use crypto++, and I don't have the latest version onmy machine.
I am using VB on the current project www.many-monkeys.com
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I want to know the algorithm of zipping the data and information. I want to bild up the application like winzip or winrar. Please tell me any logic for algorithm........
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
there are plenty of algorithms out there
I suggest you have a look at the source code for the compresion algorithm used in crypto++, you may also wish to do a search of 'zip' and 'zlib' etc on google as there are a lot of freeware (source code provided) implementations (though most algorithms of any note are patented and are protected by law)
Technically speaking the dictionary would define Visual Basic users as programmers. But here again, a very generalized, liberal definition is being employed and it's wrong - just plain wrong - Tom Archer 5/12/02
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi !
I try to use your code but i can't solve this problem. I use MFC 7 .NET
I use this code.
USING_NAMESPACE( CryptoPP ) Gzip zipper; //(1) 1 is fast, 9 is slow
zipper.Put(byteOrgTest, nFileSize); zipper.Close(); // error ?
byte* pCompressed = new byte[zipper.MaxRetrieveable()]; //error ? zipper.Get(pCompressed,zipper.MaxRetrieveable()); //error ?
error C2039: 'Close' : is not a member of 'CryptoPP::Gzip' error C2039: 'MaxRetrieveable' : is not a member of 'CryptoPP::Gzip'
As far as i can see Close is a member of Gzip?? Can you please help me? Why do I get this error message? 'error C2039:'
Thank's
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
Have you downloaded the latest crypto++ library from http://www.cryptoppp.com? The file on codeproject is probably a bit old.
Technically speaking the dictionary would define Visual Basic users as programmers. But here again, a very generalized, liberal definition is being employed and it's wrong - just plain wrong - Tom Archer 5/12/02
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes I have downloaded the latest crypto++ "Crypto++5.1.zip" library from http://www.cryptopp.com? I downloaded it again and tryed the new software but i still got the same problem. I try to compile Dialogbased MFC project but that chould not be a problem? 
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Looked a bit further looks like they have altered the Gzip library since 4.1 to which this article was written against.
you ned to
#define CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
Technically speaking the dictionary would define Visual Basic users as programmers. But here again, a very generalized, liberal definition is being employed and it's wrong - just plain wrong - Tom Archer 5/12/02
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |