longedge
02-03-2008, 07:44 AM
I'm working on a project to provide users with a quick and easy way to encrypt and decrypt a folder of files for use 'off-site' but I realised that the decryption process doesn't in itself provide any way to check for a successful decryption. If the password is incorrect the process goes ahead and produces 'rubbish'.
At the moment I'm putting a check file in to the files waiting for encryption which gets encrypted along with the rest. After decryption I'm reading it back to a string and displaying the string in a label. The label either reads "Success" or "öÖßͽU)â-Q§pÂïôÚƒ" so it's obvious whether it has worked or not :lol
To say the least, it's not very elegant. Does anybody know of a better way to do it?
At the moment I'm putting a check file in to the files waiting for encryption which gets encrypted along with the rest. After decryption I'm reading it back to a string and displaying the string in a label. The label either reads "Success" or "öÖßͽU)â-Q§pÂïôÚƒ" so it's obvious whether it has worked or not :lol
To say the least, it's not very elegant. Does anybody know of a better way to do it?