问题
This thread should not be for discussion on how bad ECB mode is, and that I should change it, but that BouncyCastle doesn't really support the mode, except for in Java, where you can use "getInstance". The code I am using is this, and it only decrypts the first block(0x1000 bytes) correctly.
BufferedBlockCipher Blowfish = new BufferedBlockCipher(new BlowfishEngine());
KeyParameter r3 = new KeyParameter(Blowfish_Key);
Blowfish.Init(false, r3);
Blowfish.ProcessBytes(pio.GetBuffer(), 0, (int)pio.Length, output, 0);
I guess the question here would be, is there a way to use ECB mode with the library, or are there any other classes I could use?
回答1:
Figured it out. My file was probably corrupt, since I downloaded it again and it worked successfully.
来源:https://stackoverflow.com/questions/15490247/blowfish-ecb-mode-in-bouncycastle