I'm trying to implement Blowfish encryption, ECB mode, through BouncyCastle. The problem is that this code encrypts only first 8 bytes of the file. I don't know, what the problem might be. I've worked with BouncyCastle before.
I found that I'm not the one having this problem, but the solution here didn't help: Blowfish ECB Mode in BouncyCastle
The code is:
byte[] fileIn = File.ReadAllBytes("file.txt"), fileOut = new byte[fileIn.Length];
BlowfishEngine blowfishEngine = new BlowfishEngine();
blowfishEngine.Init(true, new KeyParameter(Encoding.UTF8.GetBytes("ahoi")));
blowfishEngine.ProcessBlock(fileIn, 0, fileOut, 0);
File.WriteAllBytes("file2.txt", fileOut);