msoffice_crypt 0.1.2

msoffice-crypt bindings for the Rust programming language.
Documentation
# msoffice crypt toole

[msoffice-crypt](https://github.com/herumi/msoffice) bindings for the Rust programming language.

A tool/lib to encrypt/decrypt Microsoft Office Document

## requirement

you must add the lib libmsoc.so to the system lib before run the bin app.

1.linux:

```bash
export LD_LIBRARY_PATH=some/path/to/libmsoc.so/dir:$LD_LIBRARY_PATH
```

2.windows:
```bash
set PATH=some\path\to\libmsoc.so\dir;%PATH%
```
## example

```rust
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);
        println!("{ret:#?}");
        
}
```