/** * Generate the Initialization Vector from seed bytes * * @param seed the seed * @return correct padded IV for AES use */ protected byte[] getIv(String seed) { try { return cryptoHelper.fixIv(seed.getBytes("utf-8")); } catch (UnsupportedEncodingException e) { // weird, hardcoded UTF-8 throw new RuntimeException(e); } }