Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java AES CBC IvParameterSpec

856449Jun 6 2011 — edited Jun 7 2011
I'm doing encryption with AES in CBC mode using bouncycastle, and I can specify an IvParameterSpec via .init() on the Cipher. However, this IV is not automatically changed after each .doFinal().

Do I need to call .init() before every single call to .doFinal() to change the IV - or is there some better way to do it? I would expect .init() to have a lot of overhead since you are specifying a key and mode every time as well...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2011
Added on Jun 6 2011
3 comments
747 views