views:

818

answers:

3

How do I AES encrypt with the java bouncy castle library? Example code or a link to example code would be nice :)

A: 

Examples. Here is a list of examples, check the Private key cryptography section

Teja Kantamneni
I couldn't find any examples with AES there, only DES, and also the example code isn't using the bouncy castle library.
Kyle
+3  A: 

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 Cipher objects, set up CipherOutputStreams and call the write methods on those streams.

John
A: 

Check the org.bouncycastle.crypto.test package.

DanG