Java example using random IV