Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 1.64 KB

README.md

File metadata and controls

82 lines (56 loc) · 1.64 KB

MyPub Encryptor

Encryptor of MyPub Cipher Suite.

Usage

USAGE:
    mypub-encryptor.exe [OPTIONS] --key <PRIVATE KEY> <FILE>

ARGS:
    <FILE>    Sets an input file path

FLAGS:
    -h, --help       Print help information
    -V, --version    Print version information

OPTIONS:
    -k, --key <PRIVATE KEY>      Sets your private key
    -n, --name <FILENAME>        Sets a filename after decryption
    -o, --output <OUTPUT DIR>    Sets your output directory

Dependency

Flow

  1. Parse CLI argument to Config struct;
  2. Read input file;
  3. Generate passphrase from GLOBAL_CONFIG, private_key, and random identifier;
  4. Encrypt file with passphrase;
  5. Generate decryptor;
  6. Output encrypted file (.enc), key (.key), and decryptor (.dec[.exe]).

Development

Configuration

config.rs

  • network Ethereum network
  • contract_address Deployed publication contract address
  • decryptor Decryptor repository

Run tests

cargo test

Build Debug

cargo build

Build Release

cargo build --release

UI

UI

MyPub Components

Reference