BouncyCastle中的Blowfish ECB模式 [英] Blowfish ECB Mode in BouncyCastle
问题描述
该线程不应用于讨论ECB模式有多糟糕,我应该对其进行更改,但是BouncyCastle并不真正支持该模式,除了Java中,您可以使用 getInstance。我正在使用的代码是这个,它只能正确解密第一个块(0x1000字节)。
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);
我想这里的问题是,有没有办法在库中使用ECB模式,或者还有其他我可以使用的类吗?
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?
推荐答案
弄清楚了。我的文件可能已损坏,因为我再次下载它并成功运行了。
Figured it out. My file was probably corrupt, since I downloaded it again and it worked successfully.
这篇关于BouncyCastle中的Blowfish ECB模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!