So to deal with this, I have converted the blowfish class from the Openfire source project, which is in java language and you can obtain from here http://www.igniterealtime.org/downloads/source.jsp.
It is actually pretty simple to use.
Initialize with key.
Blowfish blowfish = new Blowfish("Your
Key Here");
Encrypt plain text.
string cipherText =
blowfish.encryptString("Your Plain Text Here");
Decrypt cipher text.
string plainText =
blowfish.decryptString("Your Cipher Text Here");
Do take note that the encrypted text will always be different, but it will still be able to decrypt back to the original text.
Here's the source file in C# https://onedrive.live.com/redir?resid=E6612168B803803D!353&authkey=!AA3SEAg16NdoiZ0&ithint=file%2czip
No comments:
Post a Comment