The functions EncryptFile() and DecryptFile() have common results which indicate either success or failure of operation. The following numbers are defined as CONSTs in the des56.bi file.
WARNINGS & ERRORS:
DES56_WARN_NOTCRYPTED
- Is returned by function DecryptFile() only, it means the given file is not encrypted, at least not with function EncryptFile() of this library.
DES56_ERROR_NONE
- No error happened, the given file was successfully encrypted or decrypted.
DES56_ERROR_NOACCESS
- The given file could not be opened, either it's not found or the access is denied.
DES56_ERROR_NOPASS
- The given password was an empty string.
DES56_ERROR_BADCHUNK
- Is returned by function DecryptFile() only, it means an expected data chunk was not found.
- This may indicate the given file was either encrypted by a different library version or the file is damaged/truncated.
DES56_ERROR_TRUNCATED
- Also returned by function DecryptFile() only, the given file is certainly truncated (reading past end of file).
DES56_ERROR_WRONGCRC
- Returned by function DecryptFile() only, it means a internal checksum was wrong.
- This indicates either file damage, file manipulation or (most probably case) a wrong password for decryption.
DES56_ERROR_FILEOP
- An error occurred during a common file operation (seek, rewind, getpos etc.).
DES56_ERROR_FILEREAD
- An error occurred while reading data from the file.
DES56_ERROR_FILEWRITE
- An error occurred while writing data into the file.
DES56_ERROR_LOWMEM
- Running out of memory during file buffering.