private byte [ ] generateAesIv ( ) { byte [ ] bytes = new byte [ 16 ] ; if ( ! testMode ) { SecureRandom random = new SecureRandom ( ) ; random . nextBytes ( bytes ) ; } else { bytes = "TEST1234TEST1234" . getBytes ( MESSAGE_ENCODING ) ; } return bytes ; }
Generates initialization vector for AES encryption .