PDA

View Full Version : Crypto Plugin and Blowfish


arnaud
03-23-2004, 04:54 AM
Hello,

I've a little question about the Blowfish.Encrypt and Blowfish.Decrypt actions:

When I encrypt a file with a key, and I try do decrypt the file with an other key (a wrong key), I've no error message.
Decrypted file is corrupted, but is there a way to detect a "wrong" key before ?

Thank you for your answer.

Arnaud

Brett
03-23-2004, 09:13 AM
Due to the nature of the decryption, there is no "wrong" key. The wrong key will simply give invalid results. One work-around might be to also encrypt/decraypt a text file with the same key. Then apply the decryption to both files, read in the text file and see if it contains the valid decrypted information.

arnaud
03-24-2004, 04:32 PM
Thank you Brett,

I've chosen the solution you advised to me, and it works ! It's a good workaround for what I'm doing.

Thank you !

Arnaud