Solved

How to use Wei Dai's crypto++

Posted on 2000-05-14
4
329 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
notReplace  challenge 53 115
string initialization in java 11 109
Problem to open Excel file 15 89
Message not shown 5 27
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now