diff --git a/Cargo.toml b/Cargo.toml index 3a26d79..f59fc65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,6 @@ repository = "https://git.cscherr.de/PlexSheep/plexcryptool/" license = "MIT" keywords = ["cryptology", "pyo3", "library", "dhbw"] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] name = "plexcryptool" crate-type = ["cdylib"] diff --git a/plexcryptool/__init__.pyi b/plexcryptool/__init__.pyi deleted file mode 100644 index c27ffb4..0000000 --- a/plexcryptool/__init__.pyi +++ /dev/null @@ -1,7 +0,0 @@ -""" -Bindings for the plexcryptool rust library - -plexcryptool.plexcryptool is direct access to the shared library, do not use it. -""" -from . import binary -from . import math diff --git a/pyproject.toml b/pyproject.toml index e2e253d..ae576bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,3 +14,4 @@ classifiers = [ [tool.maturin] features = ["pyo3/extension-module"] +python-source = "src-py" diff --git a/plexcryptool/__init__.py b/src-py/plexcryptool/__init__.py similarity index 100% rename from plexcryptool/__init__.py rename to src-py/plexcryptool/__init__.py diff --git a/plexcryptool/authur1.py b/src-py/plexcryptool/authur1.py similarity index 100% rename from plexcryptool/authur1.py rename to src-py/plexcryptool/authur1.py diff --git a/plexcryptool/basic-decrypt.py b/src-py/plexcryptool/basic-decrypt.py similarity index 100% rename from plexcryptool/basic-decrypt.py rename to src-py/plexcryptool/basic-decrypt.py diff --git a/plexcryptool/binary.pyi b/src-py/plexcryptool/binary.pyi similarity index 100% rename from plexcryptool/binary.pyi rename to src-py/plexcryptool/binary.pyi diff --git a/plexcryptool/math.pyi b/src-py/plexcryptool/math.pyi similarity index 100% rename from plexcryptool/math.pyi rename to src-py/plexcryptool/math.pyi diff --git a/plexcryptool/md5-analyzer.py b/src-py/plexcryptool/md5-analyzer.py similarity index 100% rename from plexcryptool/md5-analyzer.py rename to src-py/plexcryptool/md5-analyzer.py diff --git a/plexcryptool/plexcryptool.pyi b/src-py/plexcryptool/plexcryptool.pyi similarity index 100% rename from plexcryptool/plexcryptool.pyi rename to src-py/plexcryptool/plexcryptool.pyi diff --git a/plexcryptool/py.typed b/src-py/plexcryptool/py.typed similarity index 100% rename from plexcryptool/py.typed rename to src-py/plexcryptool/py.typed diff --git a/plexcryptool/trash-hash.py b/src-py/plexcryptool/trash-hash.py similarity index 100% rename from plexcryptool/trash-hash.py rename to src-py/plexcryptool/trash-hash.py diff --git a/src/cplex/printing.rs b/src/cplex/printing.rs index 4891cf7..9035a00 100644 --- a/src/cplex/printing.rs +++ b/src/cplex/printing.rs @@ -17,6 +17,8 @@ use pyo3::prelude::*; use clap::CommandFactory; use num::Integer; +/////////////////////////////////////////////////////////////////////////////////////////////////// +// "constant" printing //////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #[pyfunction] @@ -41,6 +43,8 @@ pub fn seperator() { println!("{:=<120}", '='); } +/////////////////////////////////////////////////////////////////////////////////////////////////// +// result printing //////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// /// process a result with some int diff --git a/src/lib.rs b/src/lib.rs index c7d18f6..23dd9cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,7 +59,7 @@ fn register_math_module(py: Python, parent_module: &PyModule) -> PyResult<()> { #[pymodule] fn register_algo_module(py: Python, parent_module: &PyModule) -> PyResult<()> { let algo_module = PyModule::new(py, "algo")?; - let feistel0_module = PyModule::new(py, "algo")?; + let feistel0_module = PyModule::new(py, "feistel0")?; feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::encrypt, feistel0_module)?)?; feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::decrypt, feistel0_module)?)?; feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::sbox, feistel0_module)?)?;