Results 1 to 1 of 1
Thread: AES CBC IvParameterSpec
- 06-07-2011, 12:23 AM #1Member
- Join Date
- Apr 2011
- Rep Power
AES CBC IvParameterSpec
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...