On Thu, Aug 7, 2014 at 11:02 AM, MALKIT SINGH <
malkit....@gmail.com> wrote:
> Now i am able to decrypt the file using openssl (terminal) , by using this
> command
> openssl enc -d -aes-128-cbc -K 31323334353637383930313233343536 -iv
> 30303030303030303030303030303030 -in "encrypt.aes"
>
>
>
> but i have a question here that is it a good practice to hardcode the value
> or randomly generate the value and assign to iv in java code at time of
> encryption
>
> byte[] iv = "0000000000000000".getBytes();
Use SecureRandom. IV is meant to be random, else your CBC is only as