I've been trying to get this module to work with XLSX files produced by Excel 14.0.7166.5000 (32-bit) (from the Microsoft Office Professional Plus 2010 package).
I tried to see what happened through the module, and realized the first problem is that it interprets the hashing algorithm as SHA1 (not SHA-1).
So after this, I got a new error, namely that the wrong password was given. So I compared the produced hashes and realized they are similar, but possibly with the wrong bit size, since the hash is zero padded when unpacked:
So they "look" similar produced as strings but do not compare to the same value (I suppose). I could not dig deeper into the issue currently, unfortunately, but there might be an easy fix. My knowledge of hashes and encryption routines is however limited, but it might be obvious to someone else.
Attached is the example Excel file protected by the password "foobar".
I've been trying to get this module to work with XLSX files produced by Excel 14.0.7166.5000 (32-bit) (from the Microsoft Office Professional Plus 2010 package).
I tried to see what happened through the module, and realized the first problem is that it interprets the hashing algorithm as SHA1 (not SHA-1).
So after this, I got a new error, namely that the wrong password was given. So I compared the produced hashes and realized they are similar, but possibly with the wrong bit size, since the hash is zero padded when unpacked:
So they "look" similar produced as strings but do not compare to the same value (I suppose). I could not dig deeper into the issue currently, unfortunately, but there might be an easy fix. My knowledge of hashes and encryption routines is however limited, but it might be obvious to someone else.
Attached is the example Excel file protected by the password "foobar".
sha1-password-protected.xlsx