I have this piece of test code that uses Blowfish (openssl/blowfish.h) to encrypt, then decrypt a string. But when it comes out again, it hasn\'t been decrypted properly. Can an
Blowfish operates on 64-bit blocks: that is, multiples of 8 bytes. BF_ecb_* processes a single such block. That's the first 8 characters of your string. The rest is ignored by BF_ecb_*. If you want to encrypt something longer, apply BF_ecb_* to one block after another in a loop if you're really happy to use the ECB mode, or use something like BF_ofb_*.