tags:

views:

49

answers:

2

hey folks

i am coding opera recovery tool in my delphi

i am using c++ which is already exist

http://pastebin.com/ViPf0yn6

but i didnt get whats DES_KEY_SZ in that code .

i think they are present in des.h ,but i couldnt found same des.pas :(

can any one help me please

regards

+1  A: 

Here we go: http://freebsd.active-venture.com/FreeBSD-srctree/newsrc/crypto/des/des.h.html

Apparently,

#define DES_KEY_SZ  (sizeof(des_cblock))

where

typedef unsigned char des_cblock[8];

I am not a C programmer, but I think that this means that DES_KEY_SZ has the value 8.

Andreas Rejbrand
A: 

Google Code Search finds many copies of des.h, where the DES_KEY_SZ macro is defined. It's the size of a des_cblock, which happens to be an array of eight unsigned chars.

In other words, DES_KEY_SZ = 8.

You're going to run into other problems beyond just that missing identifier, though. The code you showed calls a handful of DES functions, too. To unencrypt the data, try using DCPCrypt.

Rob Kennedy
yes DCP crypt will be useful
radick
@Rob Kennedythanks alot for reply sir , it seems more advanced for me ,can u please give a try to port this code to delphi/pascal ( i willl try to learn from u r code ) thanks in advance
steve0
Only 11 minutes passed between my posting my answer and your posting that it's too advanced. I don't think that's enough time for you to have determined that it's something you can't do. Please put some more effort into doing it yourself before giving up. I suspect there are many examples of using DCPcrypt since it's rather popular, so make sure you look at those. Which specific parts are you having trouble with? Feel free to post new questions to Stack Overflow.
Rob Kennedy
thanks sir ,i will ask if i got struck :)
steve0
@Steve0: Rob's right. Trying to do something that's a bit too difficult for you is how you truly learn to program. If you know something can be done but you don't know how, then you end up having to figure out how it works, and that leads to a lot of personal growth as a coder. (It also leads to a lot of really ugly code, but you can clean that up later, especially if you only view the first attempt as a first attempt and a POC.)
Mason Wheeler