From 921e6de38b4bf49fc88004680159ce7c1fabe479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 2 Apr 2025 17:46:32 +0300 Subject: [PATCH 1/6] ci: add typos job --- .github/workflows/workspace.yml | 6 ++++++ .typos.toml | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 .typos.toml diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index ea7305d..7f9e7ed 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -34,3 +34,9 @@ jobs: components: rustfmt - name: Run cargo fmt run: cargo fmt --all -- --check + + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@v1 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..8dc0100 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,4 @@ +[files] +extend-exclude = [ + ".git/" +] From ebc9741826783a6a7e1e89272020b65c99825dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 2 Apr 2025 17:48:06 +0300 Subject: [PATCH 2/6] ignore KBKDF test data --- .typos.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 8dc0100..94fa39f 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,4 +1,5 @@ [files] extend-exclude = [ - ".git/" + ".git/", + "kbkdf/tests/data/" ] From 67be59db5d7416f863418a0e12228a48dc7e4fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 2 Apr 2025 17:57:17 +0300 Subject: [PATCH 3/6] Ignore hex strings --- .typos.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.typos.toml b/.typos.toml index 94fa39f..bc4c560 100644 --- a/.typos.toml +++ b/.typos.toml @@ -3,3 +3,9 @@ extend-exclude = [ ".git/", "kbkdf/tests/data/" ] + +[default] +extend-ignore-re = [ + # Patterns which appear to be 16 or more characters of Base16 + '\b[0-9A-Fa-f\s+]{16,}\b', +] From a2141b3303676f0ce2f4646c8ea8b303b25beee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 2 Apr 2025 17:58:04 +0300 Subject: [PATCH 4/6] tweak hex ignore --- .typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index bc4c560..ba64113 100644 --- a/.typos.toml +++ b/.typos.toml @@ -7,5 +7,5 @@ extend-exclude = [ [default] extend-ignore-re = [ # Patterns which appear to be 16 or more characters of Base16 - '\b[0-9A-Fa-f\s+]{16,}\b', + '\b[0-9A-Fa-f+]{16,}\b', ] From 90ab0e7639d60f9ee0e1511ec7026931aafc3831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 2 Apr 2025 17:58:48 +0300 Subject: [PATCH 5/6] fix typo --- bake-kdf/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bake-kdf/src/lib.rs b/bake-kdf/src/lib.rs index d72095d..b71ec09 100644 --- a/bake-kdf/src/lib.rs +++ b/bake-kdf/src/lib.rs @@ -21,7 +21,7 @@ use belt_hash::{BeltHash, Digest, belt_compress}; pub fn belt_keyexpand(k: &[u8; N]) -> [u32; 8] { let mut t = [0u32; 8]; // TODO: move this conversion into `belt_keyrep` when we will be able - // to use generic paramaters as `[u32; N / 4]`. + // to use generic parameters as `[u32; N / 4]`. for (src, dst) in k.chunks_exact(4).zip(t.iter_mut()) { *dst = u32::from_le_bytes(src.try_into().unwrap()); } From 06bca62c7a8fcedadd77dd0d7af060ba2827501f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 2 Apr 2025 18:08:07 +0300 Subject: [PATCH 6/6] tweak hex --- .typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index ba64113..c10dfb8 100644 --- a/.typos.toml +++ b/.typos.toml @@ -7,5 +7,5 @@ extend-exclude = [ [default] extend-ignore-re = [ # Patterns which appear to be 16 or more characters of Base16 - '\b[0-9A-Fa-f+]{16,}\b', + '"[0-9A-Fa-f +]{16,}"', ]