From 99981d2eec36934f975913e0ae1666f311b8315d Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 May 2023 15:18:36 +0200 Subject: [PATCH] readme compiling notice and removing debugs --- README.md | 3 ++- src/main.rs | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f35b964..e8b4b8f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ It boils down to the following steps: - Make sure you use the right Python version. I made this with Python 3.11 and PyO3 requires at least Python 3.7 - Create a virtual environment in the root of the repository. I used `python -m venv .venv` for this. Activate the venv. - Install maturin `pip install maturin --user` -- compile the plexcryptool module using `maturin develop -r` +- compile the plexcryptool python module using `maturin develop -r` or `maturin build --release` +- compile the plexcryptool executable using `cargo run --release` or install it to your system with `cargo install --path .` Thats it! diff --git a/src/main.rs b/src/main.rs index dfe3a02..d2953e7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -76,9 +76,9 @@ pub fn main() { Commands::Math(action) => { match action.action { MathActions::Modexp(mod_exp_args) => { - let b = num_bigint::BigInt::from_str(&mod_exp_args.base.as_str()).expect("a"); - let e = num_bigint::BigInt::from_str(&mod_exp_args.exp.as_str()).expect("a"); - let f = num_bigint::BigInt::from_str(&mod_exp_args.field.as_str()).expect("a"); + let b = num_bigint::BigInt::from_str(&mod_exp_args.base.as_str()).expect("could not make bigint"); + let e = num_bigint::BigInt::from_str(&mod_exp_args.exp.as_str()).expect("could not make bigint"); + let f = num_bigint::BigInt::from_str(&mod_exp_args.field.as_str()).expect("could not make bigint"); let result = modular_exponentiation(b.clone(), e, f); if args.machine { println!("{}", result) @@ -93,7 +93,6 @@ pub fn main() { match action.action { BinaryActions::Rotate(bin_rot_args) => { let result: u32; - dbg!(&bin_rot_args.left); if bin_rot_args.left { result = binary::rotl32(bin_rot_args.base, bin_rot_args.shift_width); } @@ -117,4 +116,3 @@ pub fn main() { } } } -