Decryptor of MyPub Cipher Suite.
USAGE:
mypub-decryptor.exe [OPTIONS] --id <CID> --key <PRIVATE KEY> <FILE>
ARGS:
<FILE> Sets an input file path
FLAGS:
-h, --help Print help information
-V, --version Print version information
OPTIONS:
-i, --id <CID> Sets the publication cid
-k, --key <PRIVATE KEY> Sets your private key
-o, --output <OUTPUT DIR> Sets your output directory
- Parse CLI argument to
Config
struct; - Read input file;
- Verify file integrity on Filecoin Chain;
- Verify payment on Ethereum chain;
- Decrypt file with hard-coded key;
- Output
decrypted file
.
config.rs
network
Ethereum networkcontract_address
Deployed publication contract addresssecret
Hardcoded secret keydecrypted_name
Decrypted name
cargo test
cargo build
cargo build --release