-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support OpenOffice password decryption #157
Conversation
AES-256-CBC (no padding) + PBKDF2/HmacSHA1 key and SHA-256 password hash.
Forgot to add that to use this feature, simply pass in the password in the options hash. For example, as shown in the test in the commit:
|
@tdeo Tried to add it, but got the following error:
Using:
|
I don't like the quality of this code. |
@simonoff Can you please elaborate which parts you don't like so that I can improve them? |
the cipher. Also add more comments and reformat.
@simonoff The only obviously poor quality thing I could find was that there was superfluous file I/O. Pushed a new commit which optimizes this to stream from the zip file directly into the decryption cipher. Also added more comments and reformatted code to smaller column width and added a few more sanity checks. |
@myplaceonline it's additional 150 lines of code with 7 inherited |
@simonoff Extracted into some logical methods |
@simonoff I tried to merge in commit 85ca578 but it is currently failing tests:
|
@simonoff Test failure is caused by lines 136-137 in 85ca578#diff-e7ac28e488d98ee522c91f631315b536L136 The problem is that in the change to using a default parameter with As in the case of If it is decided to continue with commit 85ca578, then the test can be fixed with:
I will open an issue for this so it's documented as a separate issue... |
Opened Issue #159 |
separate issue roo-rb#159)
aren't there laws against using camelCasing in Ruby (TM) programs? getCipherKey? decryptIfNecessary? |
@ebertech Updated, thanks |
@myplaceonline you're welcome! yeah opensource! |
Support OpenOffice password decryption
Changes Unknown when pulling 20d77db on myplaceonline:master into * on roo-rb:master*. |
Support OpenOffice password decryption when encrypted with
AES-256-CBC (no padding) + PBKDF2/HmacSHA1 key and
SHA-256 password hash.