Java Bouncy Castle 密码学 - 使用 AES 加密
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2435338/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java Bouncy Castle Cryptography - Encrypt with AES
提问by Kyle
How do I implement AES encryption with the java bouncy castle library? Example code or a link to example code would be nice :)
如何使用 java 充气城堡库实现 AES 加密?示例代码或示例代码的链接会很好:)
采纳答案by John
If you download the bcprov source, you'll see the class org.bouncycastle.jce.provider.test.AESTest. It shows you how to set up the bouncyCastle provider, create encryption and decryption Cipherobjects, set up CipherOutputStreams and call the write methods on those streams.
如果您下载bcprov 源,您将看到类org.bouncycastle.jce.provider.test.AESTest。它向您展示了如何设置 bouncyCastle 提供程序、创建加密和解密Cipher对象、设置CipherOutputStreams 并调用这些流上的写入方法。
Edit: seems like link is broken. Look herefor AESTest
编辑:似乎链接已损坏。看看这里的AESTest
回答by Dan Gifford
Check the org.bouncycastle.crypto.testpackage.
检查org.bouncycastle.crypto.test包裹。

