You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/04/21 18:18:16 UTC

[Bug 51623] AgileDecryptor cycles

https://issues.apache.org/bugzilla/show_bug.cgi?id=51623

Andreas Beeker <an...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Depends on|                            |55818
         Resolution|---                         |WORKSFORME

--- Comment #5 from Andreas Beeker <an...@gmx.de> ---
In the ChunkedCipherInputStream.read method there was a fix as part of #55818 -
so I assume this issue has been fixed there.

The first attachment (Voti_37a_SerieA.xls) is a html file, which can be handled
by Libre Office and MS Excel (but not MS Excel Viewer), so it's not relevant
for this bug report.

The second attachment can be successfully read with the attached
TestDecryptor-code and the following code ... so this works-for-me ;)

NPOIFSFileSystem fs = new NPOIFSFileSystem(new File("encrypted.xlsx"));
EncryptionInfo info = new EncryptionInfo(fs);

Decryptor d = Decryptor.getInstance(info);

assertTrue(d.verifyPassword("aaa"));

InputStream is = d.getDataStream(fs);
XSSFWorkbook wb = new XSSFWorkbook(is);
is.close();

Iterator<Row> row = wb.getSheetAt(0).rowIterator();
while (row.hasNext()) {
    Cell c = row.next().getCell(0);
    if (c == null) continue;
    System.out.println(c.getStringCellValue());
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org