Thread: WinCrypt sample decrypting file to 1kb?

  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
    4,183
    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.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  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, 08:00 AM