if (elgEncr.length < 514) {
byte elg[] = new byte[514];
int diff = elg.length - elgEncr.length;
System.arraycopy(elgEncr, 0, elg, diff, elgEncr.length);
elgEncr = elg;
<BUG>}
Hash ivHash = _context.sha().calculateHash(preIV);
byte iv[] = new byte[16];
System.arraycopy(ivHash.getData(), 0, iv, 0, 16);
byte aesEncr[] = encryptAESBlock(data, key, iv, tagsForDelivery, newKey, paddedSize);
byte rv[] = new byte[elgEncr.length + aesEncr.length];</BUG>
System.arraycopy(elgEncr, 0, rv, 0, elgEncr.length);

if (elgEncr.length < 514) {
byte elg[] = new byte[514];
int diff = elg.length - elgEncr.length;
System.arraycopy(elgEncr, 0, elg, diff, elgEncr.length);
elgEncr = elg;
}
byte[] iv = halfHash(preIV);
SimpleByteCache.release(preIV);
byte aesEncr[] = encryptAESBlock(data, key, iv, tagsForDelivery, newKey, paddedSize);
SimpleByteCache.release(iv);
byte rv[] = new byte[elgEncr.length + aesEncr.length];
System.arraycopy(elgEncr, 0, rv, 0, elgEncr.length);
