msoffcrypto-tool icon indicating copy to clipboard operation
msoffcrypto-tool copied to clipboard

Encrypt files?

Open cristianocca opened this issue 4 years ago • 8 comments

Hello,

What would it take for the library to also support encryption of docx files? :)

cristianocca avatar Apr 29 '20 01:04 cristianocca

Hi, to support encryption we need to implement the very reverse of some functions in /format/* and /method/*. I guess that it is not so difficult in the case of OOXML documents (including .docx), but there must be some pitfalls in other cases.

I plan to support encryption in future, but the priority is low reflecting the low demand for it compared to decryption.

nolze avatar Apr 30 '20 12:04 nolze

I wouldn't mind encryption being available only for OOXML files :)

cristianocca avatar Apr 30 '20 13:04 cristianocca

I would also greatly appreciate to have both decryption and encryption possibilities available in one package. OOXML files only are also fine for me.

thnisweden avatar Jun 14 '20 00:06 thnisweden

I would also like to see the encryption on Excel files. This repo can be used for reference.

DenizUgur avatar Dec 19 '20 23:12 DenizUgur

Is anyone working on this? I have checked out mentioned repo and one of the node library xls-populate but I am not getting it that much. Any insights or specific things I can follow to implement it?

lightning003 avatar Jan 03 '21 10:01 lightning003

Well, in my project I was using Docker so I compiled the repo I mentioned and called it via child_process on python. Maybe you could do something similar? If you need a reference I can create a gist.

DenizUgur avatar Jan 03 '21 10:01 DenizUgur

Is there any python module to encrypt file with password ?

hpal007 avatar Jun 29 '21 07:06 hpal007

Is there any python module to encrypt files with passwords?

there is a couple I guest, like ' from cryptography.fernet import Fernet '.....but you can check my code without using modules, just the XOR (^) operator and a password,...the encryption would be strong if you use a complex password (numbers, uppercases, special symbols, etc), here: https://github.com/icodexys/S1mple-3ncryt1on/blob/main/Encrypt_files.py

jheffat avatar Aug 30 '21 07:08 jheffat

I created a pull request to provide encryption support on OOXML files.

stephane-rouleau avatar Jan 13 '24 18:01 stephane-rouleau

I'm pleased to share that msoffcrypto-tool now supports encryption for OOXML documents (.docx, .xlsx, .pptx), starting from version 5.3.0. This enhancement is made possible by the valuable contribution of @stephane-rouleau in PR #86.

nolze avatar Jan 18 '24 16:01 nolze