poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55544] New: org.apache.poi.EncryptedDocumentException: Unsupported hash algorithm when trying to decrypt Excel 2013
Date Tue, 10 Sep 2013 18:31:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55544

            Bug ID: 55544
           Summary: org.apache.poi.EncryptedDocumentException: Unsupported
                    hash algorithm when trying to decrypt Excel 2013
           Product: POI
           Version: 3.9
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POIFS
          Assignee: dev@poi.apache.org
          Reporter: bknippen@abinitio.com

Trying to create an EncryptionInfo from an encrypted Excel 2013 file results in
an org.apache.poi.EncryptedDocumentException exception. The hashAlgorithm in
the EncryptionHeader of the document is "SHA512" and EncryptionHeader has this:

        String hashAlg = keyData.getNamedItem("hashAlgorithm").getNodeValue();
        int hashSize = Integer.parseInt(keyData.getNamedItem("hashSize")
                                        .getNodeValue());

        if ("SHA1".equals(hashAlg) && hashSize == 20)
            hashAlgorithm = HASH_SHA1;
        else
            throw new EncryptedDocumentException("Unsupported hash algorithm");

Would be good to have support for Excel 2013 documents

-- 
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


Mime
View raw message