WinCrypt sample decrypting file to 1kb?

This is a discussion on WinCrypt sample decrypting file to 1kb? within the Windows Programming forums, part of the Platform Specific Boards category; I am following this sample, compiles fine and runs fine, i have encrypted a file with a password, upon using ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    319

    WinCrypt sample decrypting file to 1kb?

    I am following this sample, compiles fine and runs fine, i have encrypted a file with a password, upon using decrypt testEnc.exe testDec.exe , the encrypted file is 1kb, i have a cmd prompt elivated with admin rights so there is no issue with file operation apis, does anyone know what the problem is?

    the site is

    Example C Program: Decrypting a File (Windows)

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    2,612
    I would guess user error; but, that is just a guess.
    Edit: By that I think it is working correctly till you post info that means it is not.

    Why do you think the output is wrong?

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    319
    Because the decrypted file should be the same as the file that was crypted, etc back to its original, and i should be able to run the program again...
    Last edited by Anddos; 08-27-2014 at 12:42 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 07-15-2010, 04:04 AM
  2. Encrypting/Decrypting file holding binary data
    By wayne08 in forum C Programming
    Replies: 9
    Last Post: 04-21-2010, 01:16 AM
  3. help implementing wincrypt..
    By willc0de4food in forum Windows Programming
    Replies: 7
    Last Post: 09-19-2005, 11:50 AM
  4. Making Self-Decrypting EXE file
    By rpk2006 in forum C Programming
    Replies: 3
    Last Post: 09-08-2002, 03:49 AM
  5. Cryptography (wincrypt.h): Error 80090016 ??
    By beg_g in forum C Programming
    Replies: 1
    Last Post: 01-16-2002, 07:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21