News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Filesize after using Crypto APIs

Started by noname, August 10, 2015, 06:07:42 PM

Previous topic - Next topic

noname

hello,

after you encrypt a file using CryptEncrypt with a block cipher key which has a block size of 8 bytes, filesize increases by 8 bytes. but when you decrypt the encypted file using CryptDecrypt, the filesize of the decrypted file is still bigger than the original file size by 8 bytes. how can i get the original file(=the original filesize) after decrypting?

hutch--

Truncate it to its original size and if necessary, store that size somewhere in the file. Just check the documentation to see if there is a technique to get the unencrypted length.

K_F

Most likely redundant information after decryption.. I'd think  8)
'Sire, Sire!... the peasants are Revolting !!!'
'Yes, they are.. aren't they....'