Solved

How to use Wei Dai's crypto++

Posted on 2000-05-14
4
337 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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