renaming python source dir

This commit is contained in:
Christoph J. Scherr 2023-05-17 14:24:48 +02:00
parent 96b8eca3bf
commit a0448a339a
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
14 changed files with 6 additions and 9 deletions

View File

@ -10,7 +10,6 @@ repository = "https://git.cscherr.de/PlexSheep/plexcryptool/"
license = "MIT" license = "MIT"
keywords = ["cryptology", "pyo3", "library", "dhbw"] keywords = ["cryptology", "pyo3", "library", "dhbw"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib] [lib]
name = "plexcryptool" name = "plexcryptool"
crate-type = ["cdylib"] crate-type = ["cdylib"]

View File

@ -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

View File

@ -14,3 +14,4 @@ classifiers = [
[tool.maturin] [tool.maturin]
features = ["pyo3/extension-module"] features = ["pyo3/extension-module"]
python-source = "src-py"

View File

@ -17,6 +17,8 @@ use pyo3::prelude::*;
use clap::CommandFactory; use clap::CommandFactory;
use num::Integer; use num::Integer;
///////////////////////////////////////////////////////////////////////////////////////////////////
// "constant" printing ////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#[pyfunction] #[pyfunction]
@ -41,6 +43,8 @@ pub fn seperator() {
println!("{:=<120}", '='); println!("{:=<120}", '=');
} }
///////////////////////////////////////////////////////////////////////////////////////////////////
// result printing ////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
/// process a result with some int /// process a result with some int

View File

@ -59,7 +59,7 @@ fn register_math_module(py: Python, parent_module: &PyModule) -> PyResult<()> {
#[pymodule] #[pymodule]
fn register_algo_module(py: Python, parent_module: &PyModule) -> PyResult<()> { fn register_algo_module(py: Python, parent_module: &PyModule) -> PyResult<()> {
let algo_module = PyModule::new(py, "algo")?; 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::encrypt, feistel0_module)?)?;
feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::decrypt, feistel0_module)?)?; feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::decrypt, feistel0_module)?)?;
feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::sbox, feistel0_module)?)?; feistel0_module.add_function(wrap_pyfunction!(algo::feistel0::sbox, feistel0_module)?)?;