Solved

How to use Wei Dai's crypto++

Posted on 2000-05-14
4
331 Views
Last Modified: 2013-11-20
I got an Encrypt/Decrypt lib, which is Wei Dai's crypto++. But it is very complex and I don't know clearly how to use it. If anyone has used it, can you tell me the steps to use it in my own application? BTW, I only want to use DES, but this lib provide a lot of algorithms and it is very large. So is there any method to make it smaller?
0
Comment
Question by:Zhu051200
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
agomes earned 50 total points
ID: 2810907
You can use Microsoft's Crypto API (http://msdn.microsoft.com/library/partbook/win98dh/gettingstarted.htm) but I think it is too messy for only using DES.

In http://www.homeport.org/~adam/crypto/ there are other libraries, but the DES only library in http://www.cryptosoft.com (des3_win32_vc.zip) is simpler and easier to use.

Good luck!
0
 

Author Comment

by:Zhu051200
ID: 2819788
thanks!
the DES lib at http://www.cryptosoft.com is used to encrypt or decrypt 8 byte buffer. How to use it to encrypt a file? Can u give me some examples or advice?

thanks in advance
0
 
LVL 1

Expert Comment

by:agomes
ID: 2820985
There is already a sample on encrypting/decrypting a whole file in that zip file (des3_win32_vc.zip) called 'demo.c'. If you are using Visual C++, don't bother about the make file, just create a console application and paste the code. With MFC you can use CFile's Read() an Write() as well, instead of fread() and fwrite().

I am not sure (I didn't try) but I think you can change the buffer size, but changing the key size also.

I hope this helps you.
0
 

Author Comment

by:Zhu051200
ID: 2829791
I tried the demo file(name is des.h)
but this file have some problems. whether the password is correct, the decryption will still works. Do you think so?

Now I can with Weidai's lib. It's ok. But I'll still give the points to you for your kind help and patient. If you have time, please check that demo file.I am not sure where's the problem.

Thanks!
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question