Open flyInRust opened 1 year ago
and libreoffice can't open the encrypt( writer::xlsx::write_with_password) file too!
@flyInRust Thank you for your report. I can confirm that libreoffice does not open encrypted files. It probably means that there are parts of the specifications regarding encryption that differ from software to software. It would be difficult to identify the part to be fixed, so it would take some time to modify the program.
can u port the function from the msoffice-crypt ?
i have create a msoffice-crypt rust bind:
use msoffice_crypt::{encrypt,decrypt};
fn main() {
let input = "/home/feiy/Desktop/1.xlsx";
let output = "/home/feiy/Desktop/output.xlsx";
let password = "test";
let ret = encrypt(input,password,Some(output));
println!("{ret:#?}");
let plain = "/home/feiy/Desktop/plain.xlsx";
let ret = decrypt(output,password,Some(plain));
println!("{ret:#?}");
let plain = "/home/feiy/Desktop/plain.xlsx";
let ret = encrypt(plain,password,None);
println!("{ret:#?}");
}
@flyInRust Thank you very much. I have looked at msoffice crypt rust. It is a wonderful library.
However, umya-spreadsheet cannot use this library because it must be 100% rust language.
I will refer to it to find the cause of the problem.
this is the encrypt References:
after use writer::xlsx::write_with_password to encrypt some xlsx file,the wps-office can't open this file .