From 8148e1ed734428576ed0603b3112cdc62e58b4e1 Mon Sep 17 00:00:00 2001 From: hab <_@habnab.it> Date: Fri, 5 Jul 2024 01:56:20 -0700 Subject: [PATCH] run rust tests --- .github/actions-rs/grcov.yml | 14 +++ .github/workflows/pytest.yml | 22 +++-- .github/workflows/rust-test.yml | 36 +++++++ Cargo.lock | 103 ++++++++++++++++++-- Cargo.toml | 7 ++ tiny-keccak-1536/Cargo.toml | 15 ++- tiny-keccak-1536/README.md | 2 +- tiny-keccak-1536/benches/kangaroo.rs | 2 +- tiny-keccak-1536/benches/keccak.rs | 2 +- tiny-keccak-1536/comparison/Cargo.toml | 2 +- tiny-keccak-1536/comparison/benches/sha3.rs | 4 +- tiny-keccak-1536/examples/sha3.rs | 2 +- tiny-keccak-1536/src/k12.rs | 2 +- tiny-keccak-1536/src/keccak.rs | 4 +- tiny-keccak-1536/src/kmac.rs | 2 +- tiny-keccak-1536/src/lib.rs | 20 ++-- tiny-keccak-1536/src/parallel_hash.rs | 2 +- tiny-keccak-1536/src/sha3.rs | 2 +- tiny-keccak-1536/src/tuple_hash.rs | 2 +- tiny-keccak-1536/tests/cshake.rs | 2 +- tiny-keccak-1536/tests/kangaroo.rs | 2 +- tiny-keccak-1536/tests/keccak.rs | 2 +- tiny-keccak-1536/tests/kmac.rs | 2 +- tiny-keccak-1536/tests/parallel_hash.rs | 2 +- tiny-keccak-1536/tests/sha3.rs | 2 +- tiny-keccak-1536/tests/shake.rs | 2 +- tiny-keccak-1536/tests/tuple_hash.rs | 2 +- tox.ini | 8 -- 28 files changed, 208 insertions(+), 61 deletions(-) create mode 100644 .github/actions-rs/grcov.yml create mode 100644 .github/workflows/rust-test.yml diff --git a/.github/actions-rs/grcov.yml b/.github/actions-rs/grcov.yml new file mode 100644 index 0000000..b2fceef --- /dev/null +++ b/.github/actions-rs/grcov.yml @@ -0,0 +1,14 @@ +branch: true +ignore-not-existing: true +llvm: true +filter: covered +output-type: lcov +output-path: ./lcov.info +# prefix-dir: /home/user/build/ +# ignore: +# - "/*" +# - "C:/*" +# - "../*" +# path-mapping: +# - "/path1" +# - "/path2" diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 8e9672d..30a827c 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -41,6 +41,11 @@ jobs: - name: 'run tests' run: | tox + - uses: 'coverallsapp/github-action@master' + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + file: 'coverage.xml' + format: 'python' macos: runs-on: ${{ matrix.runner }} @@ -71,16 +76,16 @@ jobs: - name: 'run tests' run: | tox + - uses: 'coverallsapp/github-action@master' + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + file: 'coverage.xml' + format: 'python' windows: - runs-on: ${{ matrix.platform.runner }} + runs-on: 'windows-latest' strategy: matrix: - platform: - - runner: windows-latest - target: x64 - - runner: windows-latest - target: x86 python-version: - 'pypy3.9' - 'pypy3.10' @@ -104,3 +109,8 @@ jobs: - name: 'run tests' run: | tox + - uses: 'coverallsapp/github-action@master' + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + file: 'coverage.xml' + format: 'python' diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml new file mode 100644 index 0000000..194879c --- /dev/null +++ b/.github/workflows/rust-test.yml @@ -0,0 +1,36 @@ +name: 'rust tests' + +on: + - 'push' + - 'pull_request' + +jobs: + lint: + runs-on: '${{ matrix.platform.runner }}' + strategy: + matrix: + platform: + - runner: 'ubuntu-latest' + - runner: 'macos-12' + - runner: 'macos-14' + - runner: 'windows-latest' + steps: + - uses: 'actions/checkout@v1' + - uses: 'actions-rs/toolchain@v1' + with: + toolchain: 'nightly' + override: true + - uses: 'actions-rs/cargo@v1' + with: + command: 'test' + args: '--workspace --no-default-features --features testing-checks' + env: + CARGO_INCREMENTAL: '0' + RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cllvm-args=--inline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + - id: 'coverage' + uses: 'actions-rs/grcov@v0.1' + - uses: 'coverallsapp/github-action@master' + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + path-to-lcov: '${{ steps.coverage.outputs.report }}' diff --git a/Cargo.lock b/Cargo.lock index 33686ce..23de1f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,21 +14,54 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +[[package]] +name = "block-buffer" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +dependencies = [ + "block-padding", + "byte-tools", + "byteorder", + "generic-array 0.12.4", +] + [[package]] name = "block-buffer" version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array", + "generic-array 0.14.7", ] +[[package]] +name = "block-padding" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +dependencies = [ + "byte-tools", +] + +[[package]] +name = "byte-tools" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" + [[package]] name = "bytemuck" version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.6.0" @@ -51,6 +84,14 @@ dependencies = [ "inout", ] +[[package]] +name = "comparison" +version = "0.1.0" +dependencies = [ + "sha3", + "tiny-keccak-1536", +] + [[package]] name = "cpufeatures" version = "0.2.12" @@ -72,17 +113,26 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array", + "generic-array 0.14.7", "typenum", ] +[[package]] +name = "digest" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +dependencies = [ + "generic-array 0.12.4", +] + [[package]] name = "digest" version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "crypto-common", "subtle", ] @@ -97,6 +147,15 @@ dependencies = [ "primal-sieve", ] +[[package]] +name = "generic-array" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +dependencies = [ + "typenum", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -131,7 +190,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -156,7 +215,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array", + "generic-array 0.14.7", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", ] [[package]] @@ -219,6 +287,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "opaque-debug" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" + [[package]] name = "parameterized" version = "2.0.0" @@ -290,7 +364,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest", + "digest 0.10.7", "hmac", ] @@ -465,7 +539,20 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer 0.7.3", + "byte-tools", + "digest 0.8.1", + "keccak", + "opaque-debug", ] [[package]] @@ -474,7 +561,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f412279217fa74b69094bf6b5cde63dd0ece9b85d94fedda9bbfdfb2666125cf" dependencies = [ - "digest", + "digest 0.10.7", "threefish", ] diff --git a/Cargo.toml b/Cargo.toml index 58785fc..b304e49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,12 @@ name = "passacre" version = "1.0.1-rc2" edition = "2021" +[workspace] +members = [ + "tiny-keccak-1536", + "tiny-keccak-1536/comparison", +] + [lib] name = "_passacre_backend" crate-type = ["cdylib"] @@ -10,6 +16,7 @@ crate-type = ["cdylib"] [features] default = ["python"] python = ["pyo3"] +testing-checks = [] [dependencies] pyo3 = { version = "0.21.1", optional = true } diff --git a/tiny-keccak-1536/Cargo.toml b/tiny-keccak-1536/Cargo.toml index f6eba42..40dd9e2 100644 --- a/tiny-keccak-1536/Cargo.toml +++ b/tiny-keccak-1536/Cargo.toml @@ -14,16 +14,13 @@ categories = ["cryptography", "no-std"] [dependencies] crunchy = "0.2.2" -[profile.dev] -opt-level = 3 # Controls the --opt-level the compiler builds with -debug = false # Controls whether the compiler passes `-g` +# [profile.dev] +# opt-level = 3 # Controls the --opt-level the compiler builds with +# debug = false # Controls whether the compiler passes `-g` -[profile.test] -opt-level = 3 # Controls the --opt-level the compiler builds with -debug = false # Controls whether the compiler passes `-g` - -[workspace] -members = ["comparison"] +# [profile.test] +# opt-level = 3 # Controls the --opt-level the compiler builds with +# debug = false # Controls whether the compiler passes `-g` [badges] travis-ci = { repository = "debris/tiny-keccak", branch = "master"} diff --git a/tiny-keccak-1536/README.md b/tiny-keccak-1536/README.md index 323169a..b4ad90b 100644 --- a/tiny-keccak-1536/README.md +++ b/tiny-keccak-1536/README.md @@ -29,7 +29,7 @@ tiny-keccak = { version = "2.0", features = ["sha3"] } ## Example ```rust -use tiny_keccak::Sha3; +use tiny_keccak_1536::Sha3; fn main() { let mut sha3 = Sha3::v256(); diff --git a/tiny-keccak-1536/benches/kangaroo.rs b/tiny-keccak-1536/benches/kangaroo.rs index 45b69b1..d9ba7e4 100644 --- a/tiny-keccak-1536/benches/kangaroo.rs +++ b/tiny-keccak-1536/benches/kangaroo.rs @@ -3,7 +3,7 @@ extern crate test; use test::Bencher; -use tiny_keccak::{KangarooTwelve, Hasher}; +use tiny_keccak_1536::{KangarooTwelve, Hasher}; #[bench] fn bench_k12(b: &mut Bencher) { diff --git a/tiny-keccak-1536/benches/keccak.rs b/tiny-keccak-1536/benches/keccak.rs index 7804c12..3f77406 100644 --- a/tiny-keccak-1536/benches/keccak.rs +++ b/tiny-keccak-1536/benches/keccak.rs @@ -3,7 +3,7 @@ extern crate test; use test::Bencher; -use tiny_keccak::{keccakf, Keccak, Hasher}; +use tiny_keccak_1536::{keccakf, Keccak, Hasher}; #[bench] fn bench_keccak_256_input_4096_bytes(b: &mut Bencher) { diff --git a/tiny-keccak-1536/comparison/Cargo.toml b/tiny-keccak-1536/comparison/Cargo.toml index 1b88b6a..452d0b7 100644 --- a/tiny-keccak-1536/comparison/Cargo.toml +++ b/tiny-keccak-1536/comparison/Cargo.toml @@ -5,5 +5,5 @@ version = "0.1.0" authors = ["debris "] [dependencies] -tiny-keccak = { path = "../", features = ["sha3"] } +tiny-keccak-1536 = { path = "../", features = ["sha3"] } sha3 = "0.8.2" diff --git a/tiny-keccak-1536/comparison/benches/sha3.rs b/tiny-keccak-1536/comparison/benches/sha3.rs index 61785a8..2654d63 100644 --- a/tiny-keccak-1536/comparison/benches/sha3.rs +++ b/tiny-keccak-1536/comparison/benches/sha3.rs @@ -6,7 +6,7 @@ use test::Bencher; #[bench] fn tiny_keccak_sha3_256_input_32_bytes(b: &mut Bencher) { - use tiny_keccak::{Sha3, Hasher}; + use tiny_keccak_1536::{Sha3, Hasher}; let data = vec![254u8; 32]; b.bytes = data.len() as u64; @@ -20,7 +20,7 @@ fn tiny_keccak_sha3_256_input_32_bytes(b: &mut Bencher) { #[bench] fn tiny_keccak_sha3_256_input_4096_bytes(b: &mut Bencher) { - use tiny_keccak::{Sha3, Hasher}; + use tiny_keccak_1536::{Sha3, Hasher}; let data = vec![254u8; 4096]; b.bytes = data.len() as u64; diff --git a/tiny-keccak-1536/examples/sha3.rs b/tiny-keccak-1536/examples/sha3.rs index bfdf799..76fbfb9 100644 --- a/tiny-keccak-1536/examples/sha3.rs +++ b/tiny-keccak-1536/examples/sha3.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, Sha3}; +use tiny_keccak_1536::{Hasher, Sha3}; fn main() { let mut sha3 = Sha3::v256(); diff --git a/tiny-keccak-1536/src/k12.rs b/tiny-keccak-1536/src/k12.rs index a205d3d..8106a90 100644 --- a/tiny-keccak-1536/src/k12.rs +++ b/tiny-keccak-1536/src/k12.rs @@ -103,7 +103,7 @@ impl> Hasher for KangarooTwelve { /// # Example /// /// ``` -/// # use tiny_keccak::{KangarooTwelve, Xof, IntoXof, Hasher}; +/// # use tiny_keccak_1536::{KangarooTwelve, Xof, IntoXof, Hasher}; /// let input = b"hello world"; /// let mut output = [0u8; 64]; /// let mut hasher = KangarooTwelve::new(b""); diff --git a/tiny-keccak-1536/src/keccak.rs b/tiny-keccak-1536/src/keccak.rs index a7db0b8..e4b3ce3 100644 --- a/tiny-keccak-1536/src/keccak.rs +++ b/tiny-keccak-1536/src/keccak.rs @@ -61,7 +61,7 @@ impl Hasher for Keccak { /// # Example /// /// ``` - /// # use tiny_keccak::{Hasher, Keccak}; + /// # use tiny_keccak_1536::{Hasher, Keccak}; /// # /// # fn main() { /// # let mut keccak = Keccak::v256(); @@ -78,7 +78,7 @@ impl Hasher for Keccak { /// # Example /// /// ``` - /// # use tiny_keccak::{Hasher, Keccak}; + /// # use tiny_keccak_1536::{Hasher, Keccak}; /// # /// # fn main() { /// # let keccak = Keccak::v256(); diff --git a/tiny-keccak-1536/src/kmac.rs b/tiny-keccak-1536/src/kmac.rs index d3741c7..ea23d38 100644 --- a/tiny-keccak-1536/src/kmac.rs +++ b/tiny-keccak-1536/src/kmac.rs @@ -76,7 +76,7 @@ impl Hasher for Kmac { /// # Example /// /// ``` -/// # use tiny_keccak::{Kmac, Xof, IntoXof, Hasher}; +/// # use tiny_keccak_1536::{Kmac, Xof, IntoXof, Hasher}; /// let input = b"hello world"; /// let mut output = [0u8; 64]; /// let mut kmac = Kmac::v256(b"", b""); diff --git a/tiny-keccak-1536/src/lib.rs b/tiny-keccak-1536/src/lib.rs index 5582138..fe9b16f 100644 --- a/tiny-keccak-1536/src/lib.rs +++ b/tiny-keccak-1536/src/lib.rs @@ -3,7 +3,7 @@ //! # Example //! //! ``` -//! # use tiny_keccak::Hasher; +//! # use tiny_keccak_1536::Hasher; //! # //! # fn foo(mut hasher: H) { //! let input_a = b"hello world"; @@ -202,7 +202,7 @@ pub use parallel_hash::{ParallelHash, ParallelHashXof}; /// # Example /// /// ``` -/// # use tiny_keccak::Hasher; +/// # use tiny_keccak_1536::Hasher; /// # /// # fn foo(mut hasher: H) { /// let input_a = b"hello world"; @@ -226,7 +226,7 @@ pub trait Hasher { /// # Example /// /// ``` -/// # use tiny_keccak::IntoXof; +/// # use tiny_keccak_1536::IntoXof; /// # /// # fn foo(hasher: H) { /// let xof = hasher.into_xof(); @@ -253,7 +253,7 @@ pub trait IntoXof { /// # Example /// /// ``` -/// # use tiny_keccak::Xof; +/// # use tiny_keccak_1536::Xof; /// # /// # fn foo(mut xof: X) { /// let mut output = [0u8; 64]; @@ -270,7 +270,8 @@ pub trait Xof { feature = "cshake", feature = "kmac", feature = "tuple_hash", - feature = "parallel_hash" + feature = "parallel_hash", + test, ))] struct EncodedLen { offset: usize, @@ -281,7 +282,8 @@ struct EncodedLen { feature = "cshake", feature = "kmac", feature = "tuple_hash", - feature = "parallel_hash" + feature = "parallel_hash", + test, ))] impl EncodedLen { fn value(&self) -> &[u8] { @@ -293,7 +295,8 @@ impl EncodedLen { feature = "cshake", feature = "kmac", feature = "tuple_hash", - feature = "parallel_hash" + feature = "parallel_hash", + test, ))] fn left_encode(len: usize) -> EncodedLen { let mut buffer = [0u8; 9]; @@ -311,7 +314,8 @@ fn left_encode(len: usize) -> EncodedLen { feature = "cshake", feature = "kmac", feature = "tuple_hash", - feature = "parallel_hash" + feature = "parallel_hash", + test, ))] fn right_encode(len: usize) -> EncodedLen { let mut buffer = [0u8; 9]; diff --git a/tiny-keccak-1536/src/parallel_hash.rs b/tiny-keccak-1536/src/parallel_hash.rs index cc45818..fa71ebd 100644 --- a/tiny-keccak-1536/src/parallel_hash.rs +++ b/tiny-keccak-1536/src/parallel_hash.rs @@ -158,7 +158,7 @@ impl Hasher for ParallelHash { /// # Example /// /// ``` -/// # use tiny_keccak::{ParallelHash, Xof, IntoXof, Hasher}; +/// # use tiny_keccak_1536::{ParallelHash, Xof, IntoXof, Hasher}; /// let input = b"hello world"; /// let mut output = [0u8; 64]; /// let mut hasher = ParallelHash::v256(b"", 8); diff --git a/tiny-keccak-1536/src/sha3.rs b/tiny-keccak-1536/src/sha3.rs index 71326a2..fa51223 100644 --- a/tiny-keccak-1536/src/sha3.rs +++ b/tiny-keccak-1536/src/sha3.rs @@ -14,7 +14,7 @@ use crate::{bits_to_rate, keccakf::KeccakF, Hasher, KeccakState}; /// # Example /// /// ``` -/// # use tiny_keccak::{Hasher, Sha3}; +/// # use tiny_keccak_1536::{Hasher, Sha3}; /// # /// # fn main() { /// let input = b"hello world"; diff --git a/tiny-keccak-1536/src/tuple_hash.rs b/tiny-keccak-1536/src/tuple_hash.rs index a23ab14..b11e3f0 100644 --- a/tiny-keccak-1536/src/tuple_hash.rs +++ b/tiny-keccak-1536/src/tuple_hash.rs @@ -67,7 +67,7 @@ impl Hasher for TupleHash { /// # Example /// /// ``` -/// # use tiny_keccak::{TupleHash, Xof, IntoXof, Hasher}; +/// # use tiny_keccak_1536::{TupleHash, Xof, IntoXof, Hasher}; /// let input = b"hello world"; /// let mut output = [0u8; 64]; /// let mut hasher = TupleHash::v256(b""); diff --git a/tiny-keccak-1536/tests/cshake.rs b/tiny-keccak-1536/tests/cshake.rs index a963d55..4c51284 100644 --- a/tiny-keccak-1536/tests/cshake.rs +++ b/tiny-keccak-1536/tests/cshake.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{CShake, Hasher, Xof}; +use tiny_keccak_1536::{CShake, Hasher, Xof}; #[test] fn test_cshake128_one() { diff --git a/tiny-keccak-1536/tests/kangaroo.rs b/tiny-keccak-1536/tests/kangaroo.rs index 4492539..1279f86 100644 --- a/tiny-keccak-1536/tests/kangaroo.rs +++ b/tiny-keccak-1536/tests/kangaroo.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, KangarooTwelve}; +use tiny_keccak_1536::{Hasher, KangarooTwelve}; fn pattern(len: usize) -> Vec { (0..len).map(|j| (j % 251) as u8).collect() diff --git a/tiny-keccak-1536/tests/keccak.rs b/tiny-keccak-1536/tests/keccak.rs index 8204fe7..3fac6eb 100644 --- a/tiny-keccak-1536/tests/keccak.rs +++ b/tiny-keccak-1536/tests/keccak.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, Keccak}; +use tiny_keccak_1536::{Hasher, Keccak}; #[test] fn empty_keccak() { diff --git a/tiny-keccak-1536/tests/kmac.rs b/tiny-keccak-1536/tests/kmac.rs index 1b41f9d..7284c25 100644 --- a/tiny-keccak-1536/tests/kmac.rs +++ b/tiny-keccak-1536/tests/kmac.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, IntoXof, Kmac, Xof}; +use tiny_keccak_1536::{Hasher, IntoXof, Kmac, Xof}; #[test] fn test_kmac128_one() { diff --git a/tiny-keccak-1536/tests/parallel_hash.rs b/tiny-keccak-1536/tests/parallel_hash.rs index e119caa..3eee663 100644 --- a/tiny-keccak-1536/tests/parallel_hash.rs +++ b/tiny-keccak-1536/tests/parallel_hash.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, ParallelHash}; +use tiny_keccak_1536::{Hasher, ParallelHash}; #[test] fn test_parallel_hash128_one() { diff --git a/tiny-keccak-1536/tests/sha3.rs b/tiny-keccak-1536/tests/sha3.rs index 0a6518e..f1c9303 100644 --- a/tiny-keccak-1536/tests/sha3.rs +++ b/tiny-keccak-1536/tests/sha3.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, Sha3}; +use tiny_keccak_1536::{Hasher, Sha3}; #[test] fn empty_sha3_256() { diff --git a/tiny-keccak-1536/tests/shake.rs b/tiny-keccak-1536/tests/shake.rs index bc411ce..72442b3 100644 --- a/tiny-keccak-1536/tests/shake.rs +++ b/tiny-keccak-1536/tests/shake.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, Shake, Xof}; +use tiny_keccak_1536::{Hasher, Shake, Xof}; #[test] fn shake_xof_one() { diff --git a/tiny-keccak-1536/tests/tuple_hash.rs b/tiny-keccak-1536/tests/tuple_hash.rs index 7665b14..eb5021e 100644 --- a/tiny-keccak-1536/tests/tuple_hash.rs +++ b/tiny-keccak-1536/tests/tuple_hash.rs @@ -1,4 +1,4 @@ -use tiny_keccak::{Hasher, TupleHash}; +use tiny_keccak_1536::{Hasher, TupleHash}; #[test] fn test_tuple_hash128_one() { diff --git a/tox.ini b/tox.ini index 8ce2c7e..024a2a4 100644 --- a/tox.ini +++ b/tox.ini @@ -23,13 +23,5 @@ extras = yaml commands = py.test --cov={envsitepackagesdir}/passacre --cov-report=html --cov-report=xml -ra {posargs} {envsitepackagesdir}/passacre -[testenv:codecov] -basepython = python -skip_install = True -deps = - codecov -commands = - codecov - [flake8] max-line-length = 119