Skip to content

Commit 94f1dd1

Browse files
baloopinkforest
authored andcommitted
ci: check for typos in the CI
1 parent 9d18039 commit 94f1dd1

File tree

7 files changed

+15
-6
lines changed

7 files changed

+15
-6
lines changed

.github/workflows/workspace.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,9 @@ jobs:
5050
- env:
5151
RUSTDOCFLAGS: "-Dwarnings --cfg docsrs"
5252
run: cargo doc --no-deps --features std,serde,hazmat,sha2
53+
54+
typos:
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: crate-ci/[email protected]

.typos.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[default.extend-identifiers]
2+
# typ stands for type, but it's a reserved identifier
3+
typ = "typ"

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9595

9696
### Removed
9797
- "Unsalted" PSS support ([#294])
98-
- `EncryptionPrimitive`/`DecriptionPrimitive` traits ([#300])
98+
- `EncryptionPrimitive`/`DescriptionPrimitive` traits ([#300])
9999
- `PublicKey`/`PrivateKey` traits ([#300])
100100
- `Zeroize` impl on `RsaPrivateKey`; automatically zeroized on drop ([#311])
101101
- `Deref<Target=RsaPublicKey>` impl on `RsaPrivateKey`; use `AsRef` instead ([#317])

src/algorithms/generate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub(crate) fn generate_multi_prime_key_with_exp<R: CryptoRng + ?Sized>(
4444
if bit_size < 64 {
4545
let prime_limit = (1u64 << (bit_size / nprimes) as u64) as f64;
4646

47-
// pi aproximates the number of primes less than prime_limit
47+
// pi approximates the number of primes less than prime_limit
4848

4949
// Calculate `log(prime_limit)` as `log(x) = log2(x) / log2(e) = log2(x) * log(2)`.
5050
let mut pi = prime_limit / ((bit_size / nprimes) as f64 * core::f64::consts::LN_2 - 1.);

src/algorithms/rsa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ fn blind<R: TryCryptoRng + ?Sized, K: PublicKeyParts>(
210210
Ok((blinded, ir))
211211
}
212212

213-
/// Given an m and and unblinding factor, unblind the m.
213+
/// Given an m and unblinding factor, unblind the m.
214214
fn unblind(m: &BoxedUint, unblinder: &BoxedUint, n_params: &BoxedMontyParams) -> BoxedUint {
215215
// m * r^-1 (mod n)
216216
debug_assert_eq!(

src/key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ mod tests {
805805

806806
let pub_key: RsaPublicKey = private_key.clone().into();
807807
let m = BoxedUint::from(42u64);
808-
let c = rsa_encrypt(&pub_key, &m).expect("encryption successfull");
808+
let c = rsa_encrypt(&pub_key, &m).expect("encryption successful");
809809

810810
let m2 = rsa_decrypt_and_check::<ChaCha8Rng>(private_key, None, &c)
811811
.expect("unable to decrypt without blinding");

src/traits/keys.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ pub trait PrivateKeyParts: PublicKeyParts {
6060
/// Returns an iterator over the CRT Values
6161
fn crt_values(&self) -> Option<&[CrtValue]>;
6262

63-
/// Returns the params for `p` if precomupted.
63+
/// Returns the params for `p` if precomputed.
6464
fn p_params(&self) -> Option<&BoxedMontyParams>;
6565

66-
/// Returns the params for `q` if precomupted.
66+
/// Returns the params for `q` if precomputed.
6767
fn q_params(&self) -> Option<&BoxedMontyParams>;
6868
}
6969

0 commit comments

Comments
 (0)