aes = revision == AES_128;
if (aes) {
byte[] iv = IVGenerator.getIV();
byte[] nkey = new byte[len];
System.arraycopy(key, off, nkey, 0, len);
cipher = new AESCipher(true, nkey, iv);
write(iv);
}
else {
arcfour = new ARCFOUREncryption();
arcfour.prepareARCFOURKey(key, off, len);