Decrypted TIF Image seems to not be identical... (wodCrypt)
Well met! A brief question for you...
Our software uses several large TIF images that must be encrypted and decrypted. I have noticed that, after using your reccommended encryption/decryption algorithm for files (except for the small change of using your AES 256 instead of standard AES), the TIF file after it comes out the other side of encryption and decryption has a fairly large amount of extra data in it (particularly at the end of the file). Though the file appears to be the same when viewed, I can no longer do size comparisons and/or hash integrity checks (MD5 or the like) which we need to check for corrupted files.
Is there any reason why this extra data is being added? The following is my code snippet:
* Encrypting a TIF image file:
mwodEncryptor.LicenseKey = (omitted for security)
mwodEncryptor.Type = AES256
mwodEncryptor.Optimized = False
mwodEncryptor.SecretKey = (omitted for security)
mfileIn.FileName = (path to unencrypted TIF image)
mfileOut.FileName = (path to where we want encrypted version to be)
Call mwodEncryptor.Encrypt(mfileIn, mfileOut)
* Decrypting the same file:
mwodEncryptor.LicenseKey = (omitted for security)
mwodEncryptor.Type = AES256
mwodEncryptor.Optimized = False
mwodEncryptor.SecretKey = (omitted for security)
mfileIn.FileName = (path to the encrypted file just created)
mfileOut.FileName = (path to where we want decrypted file to be)
Call mwodEncryptor.Decrypt(mfileIn, mfileOut)
If you run these two algorithms one after the other, you get a bunch of garbage appended to the end of the encrypted/decrypted image that renders my integrity checks useless. Any suggestions?
-Alex